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
Solved

onSessionEnd and cflocation

Posted on 2006-11-21
5
937 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
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 …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

828 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