Force Page to Reload on Browser Back in Rails
On my current project we do some heavy modification of the DOM via JavaScript. This causes some issues when the users navigate via the back button – quite often the page will not contain the changes the user made, or the information they see will be out of date. (Our users are also unfamiliar with websites and tend to find this confusing)
To fix this we can force the browser to refresh the page when the back button is used. This is the Rails solution, but the headers should be the same independent of the framework used.
Be careful how you use this, since it can be very annoying for the user if the page is reloaded unnecessarily. Happy coding.