Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Browser's Back Button

Reply
Thread Tools

Browser's Back Button

 
 
A.M
Guest
Posts: n/a
 
      08-03-2004
Hi,

When I call FormsAuthentication.SignOut(); the user is not authenticated
anymore, but if user clicks on browser's Back button, all previously viewed
pages are viewable.

How can I prevent users seeing prevoiusly viewed pages using browser's Back
Button ?

Thanks,
Alan




 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      08-03-2004
you need to expire them, so they can not be read from the browsers cache.
note: this will cause a the browser to raise an alert box (must repost data)
whenever the user uses the back button, even when logged in.

-- bruce (sqlwork.com)

"A.M" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> When I call FormsAuthentication.SignOut(); the user is not authenticated
> anymore, but if user clicks on browser's Back button, all previously

viewed
> pages are viewable.
>
> How can I prevent users seeing prevoiusly viewed pages using browser's

Back
> Button ?
>
> Thanks,
> Alan
>
>
>
>



 
Reply With Quote
 
 
 
 
Raterus
Guest
Posts: n/a
 
      08-03-2004
First off, realize that they aren't going to see anything they hadn't seen before...

Take a look at this, as I believe this is the more preferred method in asp.net
http://samples.gotdotnet.com/quickst...utcaching.aspx

Also, you can set Response.Expires = 0 to instruct the browser that all authenticated content expires immediately, that way they browser will "hopefully" not show a cached version. I bet you can set this in global.asax in the Sub Application_BeginRequest and handle every page in your application. Realize though that this method was provided for compatibility with classic asp pages.

--Michael

"A.M" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> Hi,
>
> When I call FormsAuthentication.SignOut(); the user is not authenticated
> anymore, but if user clicks on browser's Back button, all previously viewed
> pages are viewable.
>
> How can I prevent users seeing prevoiusly viewed pages using browser's Back
> Button ?
>
> Thanks,
> Alan
>
>
>
>

 
Reply With Quote
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      08-04-2004
The page is probably being cached.
To turn off caching for the page, use this code:

Response.Expires = 0
Response.Cache.SetNoStore()
Response.AppendHeader("Pragma", "no-cache")

Also note that if you pop open a new window, that window has no history so
the back button will be disabled.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net


"A.M" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> When I call FormsAuthentication.SignOut(); the user is not authenticated
> anymore, but if user clicks on browser's Back button, all previously

viewed
> pages are viewable.
>
> How can I prevent users seeing prevoiusly viewed pages using browser's

Back
> Button ?
>
> Thanks,
> Alan
>
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
After gmail logs out, cannot go back through browser back button Author ASP .Net 6 01-22-2009 03:24 PM
ASP.NET Error redirect then use Back button (or programmed button) phancey ASP .Net 3 02-23-2008 03:51 PM
Firefox back button takes me back 2 pages. Useful Info Javascript 0 06-02-2007 11:21 PM
image button as a back button Chicagoboy27 ASP .Net 2 10-30-2006 05:00 PM
disable the back button provide the users with my own button to go back. sylvia sil ASP .Net 1 12-29-2004 04:41 PM



Advertisments