Services
Blog
Map
Contact Me
Rss
About
HTTP does not support protracted connections. A new connection is created to receive each file in a page (i.e., a script, image, Flash animation, etc.). Consequently, the server cannot control whether the same user requested two different item (e.g., a script and an image), because for each of these a different connection would be created.
Page transitions also create new server connections; therefore, pages cannot be interlinked nor have common parameters. There are three ways to save parameter values when moving from one page to another. These are the following:
User parameters are not saved and have to be pulled along when moving from page to page. Suppose that the design of your site can change dynamically and that a user selected a certain color theme for a certain page. Now when any other page from your site is requested by the same user, it has to be displayed using the color theme selected. This means the theme's name or number has to be passed from page to page.
It would not hurt either to be able to store the user-theme pair long term, in case the user decides to return to the site some time later. He or she will be pleasantly surprised to see that all the page settings have been preserved and don't have to be fiddled with again.
Before exploring the ways of implementing data storage, we have to establish what data and for what purpose we want to store. In this respect, it is desirable to group data by how long it is to be stored and how important it is. The two groups are the following:
Most suitable for short-term data storage are session variables; for long-term data storage of user configuration settings cookie files can be used.