30 Jan 2013

The web is stateless, why you need to refresh the page.

As I deal with people who use computers every day, who don't necessarily understand what is happening. I have decided to try and explain it once in nice simple language so that it is easy to
understand why certain web sites / applications / pages seem to have issues showing the most up-to-date information.

The web is stateless. It has no way of remembering what is happening or what has happened. This is the way it was built from the very lowest levels. It is designed to survive a nuclear war.

What you see on your computer is just a picture or view of the web application or web page at a particular point in time. The time you requested the page you are currently viewing. Your web browser has no way of know if any thing has changed on the server or web page. Unless you ask the server by requesting the page again. You need to refresh the page to see any changes that have been made since you last asked the server.

To make things even more complicated your web browser tries to speed up the time it takes to load pages by caching web pages. If you just viewed a web page your web browsers stores it on your device or computer. If you ask for that page again, instead of fetching the page from our server it will show you the page it stored on your device.

Web developers have developed a number of technologies to work around caching, by telling web browser which pages it can cache and what in a web page it can cache. Though some times this does not always work as expected and thing can be come out of sync. The pages you see are a mix of the old data stored on your device and the new content on the servers.

To make things even more complicated it all comes down to how computers understand time. The time on the server is different from the time on a server sitting in the middle of Russia. Which is also
different from the time on your computer. Even for computer in the same country the time they show can differ by hours if they are not set correctly. So how your web browser caches data, and for how long can be quite different then what our server or web page asked it to.

The point is that the only time that matters when you are working with a web server or web application is the time on the server not on your computer. Bidorbuy provides a way to see this using the follow page, http://www.bidorbuy.co.za/jsp/header/BidorbuyTime.jsp. This page can be found on our site at the very bottom of every page, in the footer under the bidorbuy heading.