However maintaining state with Anchors brings a different problem. Using a database as a back-end for a Web application is one method of maintaining state. Of course, for database activity, you may want to have the user login with a username and password for accountability and to control data access. However, you don't want the user to login on every click.
In this method of maintaining state information, the information is passed to and from the browser using the HTML code that is sent to the browser for display. Part of the returning data from the browser is that same information.
The information can be sent explicitly, or else it can be sent by reference - the information passing to and from the HTML being just the ID number of a State Server cookie which is used to hold the real information. This latter technique might be more secure.
Remember that Sapphire/Web's State Server maintains numbered cookies, not named cookies.
The diagram above illustrates an alternative way of keeping information with the cooperation of the browser. Instead of altering the HTML code to include a hidden variable that gets returned when the user presses a button - best used with forms - it uses a setting of the browser variable HTTP_COOKIE. On re-invocation, the server application can investigate this value and act appropriately.