The Robertson Team

































  Programmers' Tools >  The Free Stuff >  Obsolete Tags >  SessionMonger >  Usage


To call the tag insert this code at the top of any page you want to test for session ID validity and expiration. I usually use it from a centrally located, CFINCLUDED header template so I only have to call it once:

    <CF_SESSIONMONGER Visit=#Visit# MySite="YourDomainNameHere">

For max functionality make sure your CFAPPLICATION statement enables client management and sets client cookies:

     <CFAPPLICATION NAME="YourAppNameHere"

You MUST initialize the Visit parameter outside the tag itself. This can be done by placing the following in application.cfm

     <CFPARAM NAME="Visit" DEFAULT="0">

  1. VISIT (Required). The session ID. Created within the routine itself and passed back for expiration and identity testing.
  2. MYSITE (Required). Your domain name. Leave out the ".com", ".net" etc. if you have multiple domains parked on one location (e.g. "", "" etc.).
Here are five different ways to pass the variable from one page to another. Note there are different reasons to use each of these. They are just presented here as standalone examples.

     <CFLOCATION ADDTOKEN= "No" URL="somepage.cfm?Visit=#Visit#">
<FORM ACTION="actionpage.cfm?Visit=#Visit#" method="POST">
     <INPUT TYPE="Hidden" NAME="Visit" VALUE="#Visit#">
     <A HREF="anypage.cfm?Visit=#Visit#">
     <META HTTP-EQUIV="REFRESH" CONTENT= "0;URL=refresh_page.cfm?Visit=#Visit#">

The Robertson Team,
1.559.360.1717 is a leader in ColdFusion web hosting and managed dedicated servers.