Apache::ASP Powered by ModPerl & Apache Powered by Apache::ASP
Demo ASP: global_asa_demo.asp 2024-03-29

This example serves as how one may use the global.asa file event handlers. Please see the global.asa file for the code relevant to this example.

The following table lists the sessions that have been recorded in the global.asa file into $Application. When a session ends, its time lived is recorded and displayed below. Active sessions are also listed.

18 Sessions Recorded
2 Active Sessions


006f68... 165 seconds
$VAR1 = {};

00f38d... 321 seconds
$VAR1 = {};

01091f... 321 seconds
$VAR1 = {};

0157b6... 1711704075 seconds
$VAR1 = {};

026dd8... in session
$VAR1 = {
          'Started' => '1',
          'Ended' => '1',
          'onstart' => '1711704305',
          'Count' => '10'
        };

02ae15... 453 seconds
$VAR1 = {};

02f75c... 1711704075 seconds
$VAR1 = {};

068f25... 350 seconds
$VAR1 = {};

0745dd... 101 seconds
$VAR1 = {};

08bbfa... in session
$VAR1 = {
          'Started' => '1',
          'Ended' => '1',
          'onstart' => '1711704074',
          'Count' => '10'
        };

0a6250... 387 seconds
$VAR1 = {};

0acaf7... in session
$VAR1 = {
          'Started' => '1',
          'Ended' => '1',
          'onstart' => '1711704136',
          'Count' => '10'
        };

0c1295... 427 seconds
$VAR1 = {};

0ce8f3... 322 seconds
$VAR1 = {};

0dfa80... 410 seconds
$VAR1 = {};

0e71a9... in session
$VAR1 = {
          'Started' => '1',
          'Ended' => '1',
          'onstart' => '1711704256',
          'Count' => '10'
        };

0f5a4a... 341 seconds
$VAR1 = {};

0fcc5f... in session
$VAR1 = {
          'Started' => '1',
          'onstart' => '1711704361',
          'Count' => '10'
        };

To see multiple sessions listed you may create a 2nd session by closing and then reopening the browser you are using to view this file, or you may also open a 2nd kind of browser to create this 2nd session. There is only one session-id generated per browser session for an asp application.


Here is a simple use of the Script_OnStart & Script_OnEnd event handlers, keeping track of the number of scripts executed this session:
Scripts Started This Session: 1
Scripts Ended This Session: 0

view this file's source