Setting Session Timeout

A session is a group of interactions that take place on your website within a given time frame. For example a single session can contain multiple page views and AJAX requests. A single user can open multiple sessions if they use more than one browser. A single user might also have multiple sessions in a day should one session end and new one begin. By default a session ends after 30 minutes of inactivity.

For example, when a user, Tom, arrives on your site, WebTuna starts counting from that moment. If 30 minutes pass without any requests from Tom then the session ends. However, every time Tom makes a new request for a page or AJAX request then WebTuna resets the expiration time by adding on an additional 30 minutes from the time of that interaction.

There are 2 ways in which you can override the default behaviour described above.

  • Override wt.sessionTimeout and set a different session timeout duration.
  • Override wt.session and use the session id used within your application.

NOTE: There is no point in overriding both of these. If you do, only wt.session will be used and wt.sessionTimeout will be ignored.

Example of how wt.sessionTimeout can be used

This example code will set session timeout to 60 mins (=3600000ms)

<script type="text/javascript">
wt.sessionTimeout = function (){
     return 3600000;

NOTE – This code must come after the line which calls webtuna.js