Thanks.. regarding this link: http://coldfusion.sys-con.
It's from 2000 - hasn't CF come out with anything less complex? Such as doing something like this:
(Which is what I'm really after)
Main Topics
Browse All TopicsIs there a SIMPLE way to detect a session time out in ColdFusion and force a redirect to a specific URL? Either due to no activity or the sessiontimeout="#CreateTim
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Thanks.. regarding this link: http://coldfusion.sys-con.
It's from 2000 - hasn't CF come out with anything less complex? Such as doing something like this:
(Which is what I'm really after)
The CFIF code will not work, due to the way sessions are timed. As soon as a user requests a page, their session timeout is reset to it's default (20 minutes for a default CF install). Basically, this means that you can't see how much time is left in that specific session by using server side code. The only way you'll be able to redirect them is by using something like the javascript code erik mentioned above. I hope this clears things up a bit.
> It's too bad Adobe hasn't thought of such a simple concept to have native time feature.
This is a browser level issue, client-side, coldfusion or any other server-side language cannot have any control over it. That's why vonRoque suggested javascript because it runs client-side.
When the page loads, set a timer running that is in-line with your session time-out. Have the javscript redirect you to a login page that drops the session.
I guess we misinterpreted your question. We thought you meant that if the page sits idle for 20 minutes, the page would automatically change to a session-timed-out page without user intervention. Banking sites or credit card sites often do this in case someone walks away from the computer.
The solution with session variable testing will work, of course (that's what they're for) when the user attempts to go to another page. The new page will catch the fact that the session variable no longer exists and sends you to the login page (or whatever).
We over-thought your question expecting it would be more than just testing for a session variable..
Another approach is...
<cfif NOT isDefined("session.user_id
<cfinclude template="login.cfm">
...
Yes. that is what my original question was. But in doing searching and the input fom EE, and without having to figure out a JavaScript that would accomplish the task (noone actually provided me with a script) - i had to resort to testing for the existance of a defined variable name. Which does no exist after the session times out.
So, iF the user tries to load a page and the value is not there, they are sent back to the login page with an message being displayed. Not as user friendly as automatically forwarding the user, but it got the job done.
Thanks for the feedback.
Business Accounts
Answer for Membership
by: erikTsomikPosted on 2009-04-08 at 07:17:33ID: 24097505
try reading this com/node/4 1925 e.com/Prog ramming/La nguages/.N ET/ Visual_ CSharp/Q_2 2536386.ht ml#a189834 90
http://coldfusion.sys-con.
also read this post
http://www.experts-exchang