15
  1. Vote on a question or add as a favourite.
  2. Click a link.
  3. Press the back button.
  4. The vote isn't visible (but has still been recorded).

Chrome v6.0.472.63

1
  • 3
    Perhaps because the page isn't refreshed?
    – TheLQ
    Oct 19, 2010 at 1:15

2 Answers 2

15

This 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.

4
  • Surely it can be better than that. What prevents this bug from being fixed?
    – tshepang
    Feb 3, 2011 at 15:46
  • 3
    @Tshepang either they change the voting system so that you POST BACK every time you upvote or downvote, or you redesign the XMLHttpRequest object so that it modifies the cached document on disk. Or, you realize it doesn't frigging matter at all and move on.
    – user1228
    Feb 3, 2011 at 19:07
  • @Tshepang I've addressed your concerns in an answer to this question. Hopefully this helps you understand better why this is not an easy thing to fix, and what workarounds exist.
    – Pollyanna
    Feb 4, 2011 at 3:48
  • Yes, quite annoying that "you return to the previous page as it was when you visited it" means "when you began the visit", not "when you ended the visit" Mar 19, 2021 at 23:37
10

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.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .