Cold Fusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingCold Fusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old May 12th, 2003, 03:58 PM
kkknapp kkknapp is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 1 kkknapp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Session management and the browser's back button

I have an application where access is controlled by using session management and a valid login. This is my Application.cfm file:

<!--- Sets up session management --->

<CFAPPLICATION NAME="NCDLogin"
SESSIONMANAGEMENT="Yes"
SETCLIENTCOOKIES="Yes">

<!--- Clears session if browser window is closed --->

<CFIF IsDefined('Cookie.CFID') AND IsDefine('Cookie.CFTOKEN')>
<CFSET localCFID = Cookie.CFID>
<CFSET localCFTOKEN = Cookie.CFTOKEN>
<CFCOOKIE name="CFID" value="#localCFID#">
<CFCOOKIE name="CFTOKEN" value="#localCFTOKEN#">
</CFIF>
</cfif>

<!--- Set data source --->

<CFIF NOT IsDefined("APPLICATION.DSN")>
<CFSET APPLICATION.DSN = "NCD_OLE">
</CFIF>


There are parts of the application that contain links outside my application directory structure. If the user selects one of the links, I need to cancel the session, forcing them to log in for access again. No matter what I try, the back button on my browser always allows access to the last visited page. However, once they get to that last visited page, the session has been cleared and the next page they try to connect to inside my application sends them to the login screen.

So, my question is how do I disallow the back button on the browser?

Reply With Quote
  #2  
Old May 13th, 2003, 10:06 AM
ChiMex ChiMex is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Location: Colorado
Posts: 22 ChiMex User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
There's no real way to disable the back, but there's some javscript hacks you can use, try this one:
http://developer.irt.org/script/311.htm Look at item 4.

Reply With Quote
  #3  
Old January 21st, 2007, 01:02 AM
sofiz sofiz is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2007
Posts: 1 sofiz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 m 28 sec
Reputation Power: 0
Lightbulb use a session variable

Instead of disabling the back button of the browser, try using a session variable which u can clear once the user finishes using a page. On the page load function of the page that should not be reached thru back button, check for the session variable content. If the user navigates back, the session variable which has been cleared/changed can control the page load

hope this helps

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingCold Fusion Development > Session management and the browser's back button


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap