Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

onSessionEnd and cflocation

Posted on 2006-11-21
5
Medium Priority
?
970 Views
Last Modified: 2013-12-24
is there a way for the onSessionEnd function of the Application.cfc file redirect the user to a different url when the session ends...i tried just using the <cflocation url="login.cfm"> tag but that ddidnt seem to work
thanks
0
Comment
Question by:jduawa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 12

Accepted Solution

by:
pigmentarts earned 375 total points
ID: 17990512
from what i understand (still learning cf) the application.cfc is only served when a request is made for a page. this is why the onSessionEnd cflocation bit does not work straight away when the sessions ends or times out because I had this issue awhile back.

i.e. you're on a page for a while, you then logout, and its not until you try and do something else ilike  access another page that the app.cfc runs and the redirect works because the session has ended.

If that’s what you’re implying and not sure.
0
 
LVL 1

Author Comment

by:jduawa
ID: 17990528
i was doing more googling and since onSessionEnd occurs asynchronously it cannot do a cflocation call
0
 
LVL 12

Expert Comment

by:pigmentarts
ID: 17990734
thats what i was saying above.  onSessionEnd occurs but its not until the next request to the server the broswer would know about it, at at points it too late.

why not use javascript to inform the users when the session is going to time out?
0
 
LVL 1

Author Comment

by:jduawa
ID: 17990749
that too is a possibility, it just would have bene more convenient to use the onsessionend.  I will award the pts for the effort
0
 
LVL 12

Expert Comment

by:pigmentarts
ID: 17990796
if i have not answered you're question then dont, i am sure someone can jump in and help.

i used a counter in javascript in the app file, every time the app.cfc is run (every page request) the counter is reset to 0, if the counter get to a set limited it informs the user the session is about to timeout and gives them a change to do something.

becuase app.cfc is done server side i dont think it will work how you want it.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
What You Need to Know when Searching for a Webhost Provider
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question