Steve,

There are a number of ways (probably more than I'm listing here):

1. If you're using Application.cfm, sdd code to it so that if of your
session (say, session.logged_in) is undefined, then it will redirect the
user to a login page.  This way, the 'processing' page for your form never
even gets loaded and the result is no error (just a frustrated user from
having filled out the form and now they will have to do it again)

2. Add a meta tag redirect to your form page that matches your session
timeout.  Although this is a client side redirect, it can accomplish pretty
much the same thing - if there is no activity in the browser for that period
of time, the page redirects to a specified page ("your session has timed
out, click here to login") or something like that.

I would prefer option 1, but others prefer option 2.  There are probably
some other options some may have here on the list as well.

Dave Phillips

-----Original Message-----
From: DURETTE, STEVEN J (ATTASIAIT) [mailto:[email protected]] 
Sent: Wednesday, November 04, 2009 1:02 PM
To: cf-talk
Subject: Session is invalid error is driving me nuts!


All,

 

Ok, this is a little pet peeve of mine.  We have session timeout set and
we tell users that they have to do something within so much time.

 

Problem is the users ignore that.  They open a page with a form, leave
it open for an hour, then when they submit the form Session is invalid
error.  They see a nicely formatted An Error has occurred page, but I
get an email for each one.

 

Any ideas (besides changing the timeout) of what I might do to prevent
this?

 

I have toyed with the idea of locking the form and putting up a message
saying that they timed out. Then they would have to close the
window/tab. Even if they hit refresh it would generate a new session, so
no error.  I'm just not sure of the best way to go about that.  Also,
anything I'd try to figure out should be able to just be cfincluded or
done in Application.cfm/cfc so that I don't have to go through hundreds
of files to solve this one.

 

Thanks,

Steve

 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328034
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to