> I have an application that, after 20 mins of idle (detected 
> by JS), the user is given a warning saying they are about to 
> be logged out with a link to keep the session going.  My 
> original plan was to sent an AJAX request to a page when the 
> link is clicked, but I have read that an AJAX request will 
> not keep the session alive.  Redirecting off the page is out 
> of the question.

In the past I have had the "yes keep my session active" option like this
create an image object within JavaScript and then set the source attribute
to a ColdFusion page that served up a blank image (not that it mattered
since it was never displayed anywhere.  This can also be used to ping the
server and have data passed back in a cookie that the JS can read, a sort of
"poor-man's AJAX" before AJAX was even a term).  There are certain instances
in a content management system where you may want to automatically keep the
session alive longer without prompting the user, and the same method applies
in the background.


-Justin


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:325494
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