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.

USAGE:
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.



ADVANTAGES:
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





TagDescription
[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


DOWNLOAD WEBDNA NOW!

Top Articles:

Tips and Tricks

A list of user-submitted tips ...

F.A.Q

A compilation of some user's questions...

Download WebDNA Applications

WebDNA applications...

AWS Raw WebDNA LAMP-Plus WebServer

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

Technical Change History

This Technical Change History provides a reverse chronological list of WebDNA changes...

WebDNA Libraries

A list of available libraries for WebDNA...

Related Readings:

[search]

Use the [Search] context with [founditems] to easily retrieve records from your databases...

[random]

will display a random number...

[commitdatabase]

[COMMITDATABASE db=name...

[writefile]

[writefile] functions allows you to perform a wide variety of tasks...

[appendfile]

Writes text to the end of an existing file...

[return]

Explicitly identify what text is returned from a function call...