?
Solved

onSessionEnd and cflocation

Posted on 2006-11-21
5
Medium Priority
?
960 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

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

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

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

777 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