417 users using DBSP now!
home -> documentation -> environment guide -> Conserving state in stateless applications


Regardless what kind of dynamic content site we are creating, is almost necessary for every web site to pass or store values in some way between its pages. This is commonly used by instance, to remember some of the user preferences or any other required information like the identification of the user currently accessing the system (as we shall see in chapter 8).

Key concept

Remember that the HTTP protocol is stateless. This means that each request that a web browser do is processed independently by the web server, without any previous knowledge of the pages that were displayed before to it. Therefore is necessary that each request contains additional information that helps the system to rebuild the state of the user's web browser at the moment that the request was originated.

Consider the next example:

Suppose that you want to display a page with different offers depending of the user region.

In the first page, you displayed and option list with all the valid worldwide regions.

In the second page and subsequent pages, you want to display the information according the selected region.

How do you remember which country the user selected?

Previous | Next