An introduction to e-commerce and distributed applications
An introduction to e-commerce and distributed applications

Start this free course now. Just create an account and sign in. Enrol and complete the course for a free statement of participation or digital badge if available.

4.1.2 Stateless servers

Web servers are what are known as stateless servers. What this means is that in their pure form they keep no memory of what has previously happened to them between requests; for example, when a request is processed by a web server for a page they have no direct knowledge about whether the page request was made by the same browser that asked for a previous page to be returned.

While this was not serious when web servers were being mainly used for dispensing documentation (their original use) it is a serious problem in e-commerce. One example of this is the shopping cart, or as it is known in the United Kingdom, the shopping trolley. When you visit an e-tailer and purchase goods you interact with a simulation of a shopping cart which keeps details of the goods that you have purchased. At the end of your interaction a web page, often known as a checkout page, will display the contents of the shopping cart and present you with the monetary total of your purchases. web servers as originally envisaged are unable to do this as they have no knowledge of any previous visit: they would not be able to remember the previous purchase.

(This is not the full story: there is some indirect knowledge. web servers will keep details of the accesses to their stored pages in a simple sequential file known as a log file which is used for marketing purposes and for optimising the web server.)

In the comparatively early days of the web this was seen to be a problem and a form of programming known as Common Gateway Interface programming was developed which enabled a web server to have a memory. There are a number of other, more recent technologies which have been developed to cope with this problem. The first is cookies; these are chunks of data which are stored on the computer running the web browser and which can be accessed by the browser throughout their interaction with a particular website. Such cookies can, for example, store the data associated with a shopping cart. Another technology used to store state is servlets; this is a technology, which employs cookies, and which is associated with Java; it enables the programmer to develop reusable code that can be plugged into a server and which keeps data persistently in the web server.

Take your learning further

Making the decision to study can be a big step, which is why you'll want a trusted University. The Open University has 50 years’ experience delivering flexible learning and 170,000 students are studying with us right now. Take a look at all Open University courses.

If you are new to University-level study, we offer two introductory routes to our qualifications. You could either choose to start with an Access module, or a module which allows you to count your previous learning towards an Open University qualification. Read our guide on Where to take your learning next for more information.

Not ready for formal University study? Then browse over 1000 free courses on OpenLearn and sign up to our newsletter to hear about new free courses as they are released.

Every year, thousands of students decide to study with The Open University. With over 120 qualifications, we’ve got the right course for you.

Request an Open University prospectus371