When I press <== back
button in the browser, what is going on?
- Is the query with the same URL made again?
- Is the current DOM state saved and restored? (HTML only)
- Is the current page state saved and restored? (HTML + Javascript)
- Is the server queried but if sends
unchanged
then local cache is used? - In general, can we consider we have up-to-date information on the previous page?
I am unclear because of those situations:
- Stackoverflows sometimes handles my upvotes very badly (not displaying it, preventing me from undoing because I last voted 5 minutes ago but it was in another tab etc.)
- When I work on local environment, I don't have the feeling much is queried then
- I'm always pretty unsure of what's going to come when going back, hence as a developper, avoid using it as much as possible (only to find back a URL in the history actually)
My opinion is that querying again would be the best idea, but it is not the fastest, and browser may want to be fast in that case (to impress the user)... On the other hand, storing page states must cost a lot of memory...