Sessions
Traditionally a request from a client is finished for a web server, as soon as the page has been sent. There is no way
to keep data in between requests. HTTP can do POSTs which are used for example by forms who sent their data
to the next page or to a script for processing. But to keep data over several pages, the POSTs have to be
done for every page the user navigates to; additionally this means, that this data has to be transferred
every time, even if it is not used on the page.
To overcome this limition, programs on the server can cache data. Form data can be stored on the server and
processed or sent back to the client, whenever this is necessary. The server can also prepare large amounts of
data, e. g. in a data base.
Since multiple requests from different clients can arrive at the server, there must be a way to differentiate
between the data sets the server manages for each client. Each client is assigned a unique number, and each data
set is tagged with this number.
In turn each client must identify itself every time it sends a request to the server. While ASP and PHP use
cookies, WebPoint utilizes the address itself. A special parameter format for the URL is used for identification.
Session start
A new session for a client is started whenever a client requests a page off WebPoint without an identification.
This happens usually, when just the address and the Application ID has been entered in the browser's address bar.
The server generates a session and identifies it with a number. This number is accessible from all HTML and
script files delivered from the server via variable substitution or function call respectively.
Session variables
Data in sessions can be stored in session variables. This is done in script files with the SetSessionValue
function. Session variables are then accessible by all scripts of this site via the GetSessionValue function.
In HTML files these variables can be inquired with variable substitution.
Session variables are kept by the server until they are deleted or the session is teared down.
Session tear down
When a client does not request pages for a certain amount of time.
|