documentcloud/backbone — Issue #664: Feature Request: history.replaceState
Author: Alxandr
Created: 2011-10-10 01:55:54+00:00
State: open

I would like backbone to be able to do replaces in the state. For instance, I've enabled my backbone-app to check if the user is logged in or not, and if not, it "redirects" to login (`controller.navigate('login', true)`). However, this makes it impossible to click back on the browser as you just get pushed back to the login again. When everything is run on the client, it's important to be able to mimic the way you can redirect with HTTP where it doesn't leave any history, therefore I would like if this could be implemented.

For legacy-navigation (using #) I believe it's possible there too using window.location.replace('#/login'), but I haven't tried.