Get a Quote Today!   |   + 1 (301) 424 3903




 
  Community
 
Need Help?
Visit our Training page
Request a Quote or Consultation
SIGN UP FOR THE TERATECH NEWSLETTER
 

ColdCuts

Cut: Crossed and Catching Issues in Session Variables
Cut#: 161 
Cut Date: 05/23/2000 
Cutter: Jason Bayly 
Topic: Session Management 
Overview:

Would appreciate a bit of help with a critical problem I am experiencing....... I am running a site using session variables on CF 4.01 and NT 4 Service Pack 6. Every so often, the session variables seem to go wrong....for example: Fiona logs in and the welcome says Hi Fred!! Fiona gets all Fred's information (which wouldn't make Fred very happy). Fiona is always accessing the site through the same machine.

 

Cut Code:
To generate random numbers on the end of a url, you can use the rand
function.

ie..
<cflocation url="anywhere.cfm?rand=#rand()#"> or
<a href="anywhere.cfm?rand=#rand()#&rec_id=#query.recid#">Update</a>
this will trick any proxy servers into NOT dishing out cached pages as they
see it as a new one.We used this
and cflock)when we were getting inconsistent session variables between users
in a computer
lab on the intranet at the university of sydney. This combination really
tightened our
app up, which is an online multicourse, Chemistry Pre work module for first
year students.

We now use this technique alot, where we need to control user state for
tracking, assessment
purposes etc. Im sure it isnt the best way to do it...

Id love to hear anyone elses techniques, for by passing proxy servers and
browser caching issues and
maintaing user state(ensuring the current user is ALWAYS recieving their
information as they generate it etc)