Solved

onSessionEnd and cflocation

Posted on 2006-11-21
5
901 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
  • 3
  • 2
5 Comments
 
LVL 12

Accepted Solution

by:
pigmentarts earned 125 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now