- Vote on a question or add as a favourite.
- Click a link.
- Press the back button.
- The vote isn't visible (but has still been recorded).
Chrome v6.0.472.63
Meta Stack Exchange is a question and answer site for meta-discussion of the Stack Exchange family of Q&A websites. It only takes a minute to sign up.
Sign up to join this communityThis is to be expected.
Each time you visit a web page, you are getting the current state (server time). The server state can be changed without your page being changed.
If you use the back button, you return to the previous page as it was when you visited it. Without any changes in the state that has occured from then. Refreshing the page gives you the current state with all changes.
You can compare it with travel. You are traveling the world and each visit you take a picture. If you look at the pictures they show a world of the past. You can go back to the place and take a new picture if you want to update it.
This is nontrivial to fix. The vote is incremented without a page load, and the number on the page is changed with javascript. However, these changes are not saved in the browser cache.
When you hit the back button, the browser looks in the cache and loads the page from the cache, not the server. Therefore your vote which is recorded correctly on the server will not show up because the page stored in the cache has the older information. The browser does not attempt to save page state changes due to javascript - instead it displays the page as though it is new.
This is one of the drawbacks with using ajax techniques to update the page, and is not a sufficiently bad user experience that requires attention.
If it turns out to be a significant problem for you, consider disabling javascript. Upvotes and favoriting will then cause page reloads, and the behavior may be more to your liking.