Technical References - [session]

[session] is a new WebDNA feature that recognises a browser through its "fingerprint"

[session] is a new WebDNA feature (from version 8.1) that recognises a browser through its "fingerprint", and thus to get rid of a cookie in most cases. It is fast and easy to use.

The server-side session is created when the visitors first hits a page with [sessionstart] in it; a unique ID is generated and remains valid until the "lifetime" expires.

[sessionstart life=1200] > starts a 20 min session
[sessionstart] without any specification has an unlimited lifetime

The session is recorded inside a database "reserved.db" in /WebDNA (FastCGI version) or in /globals/ (server version), one column for the "browserID" and the other one for the session itself.

The value of the unique session is available through a tag [session], a unique Session Identifier, and allows the developer to pass this [session] information from one page to the other, store it and link it with a name and/or a shopping cart, or whatever.

follow the visitor by moving the [session] value from one page to the other with a POST or GET
Identify a visitor who logged-in : associates the tag [session] with the user name
Identify a visitor who comes back after few days. Depending on the settings, the session test allow to recognise him.

Work with search engines
Security is increased by not allowing a cookie to be manipulated, since there is none
Easier to use and much faster than a client-side cookie
Good for visitors who do not want to leave information behind them (cookie disabled)
Allows to easily kill a session
Allows to move a session from a browser to another browser

[sessionstart]Starts a session by recording the day, time of the day, IP, Unique browser ID and (optional) the life in seconds, like in [sessionstart life=10]
[session][session] has a unique value once the session is started. This value can be moved from one page to another using POST or GET
[sessionIPmatch]T(rue) or F(alse): checks if the session IP is the same as the current IP
[sessionalive]T(rue) or F(alse): checks the current time against the session time if it is alive
[browserIDmatch]T(rue) or F(alse): checks the browser "fingerprint" against the session browser ID
[sessionend]kills a [session] by deleting it from reserved.db
[sessionip]shows the IP number stored in session, format [ipaddress] (with the leadings 0, so we can do comparisons)
[sessiondate]shows the date stored in session
[sessiontime]shows the time stored in session
[sessionlife]calculates how many seconds a session is still alive, and show 0 if terminated
[sessionutime]shows the session Unix Time (also known as POSIX time or Epoch time, defined as the number of seconds that have elapsed since 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970)

In certain rare cases, it is possible to find two identicals browser "fingerprint" or BrowserID. It is not advised to do visitor recognition based only on Browser ID


Top Articles:

Tips and Tricks

A list of user-submitted tips ...

WebDNA reference


Download WebDNA Applications

WebDNA applications...

WebDNA Libraries

A list of available libraries for WebDNA...

AWS Raw WebDNA LAMP-Plus WebServer

Amazon Web Services (AWS) README for Machine Image ID...

WebDNA Modules

A list of the currently available modules...

Related Readings:


Highlights matching words with boldface HTML tags...


Putting [time] in your template displays the current time set on your web server's clock...




Replaces each found record in a database with the new field values...


[showif Comparison]Show This HTML[/showif]...

Alphabetical WebDNA Reference

A list of all WebDNA instructions...