473,322 Members | 1,421 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Browser's Back Button

A.M
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


Nov 18 '05 #1
3 1257
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" <no*****@online.nospam> wrote in message
news:O7**************@tk2msftngp13.phx.gbl...
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

Nov 18 '05 #2
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" <no*****@online.nospam> wrote in message news:O7**************@tk2msftngp13.phx.gbl...
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



Nov 18 '05 #3
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" <no*****@online.nospam> wrote in message
news:O7**************@tk2msftngp13.phx.gbl...
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

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Ralph Freshour | last post by:
Is it possible to inhibit the browser Back/Fwd buttons via PHP? Thanks...
21
by: Tony Marston | last post by:
If the use of the browser's BACK button is interfering with the operation of your web application then take a look at this article entitle "Back Button Blues" ...
7
by: zdrakec | last post by:
Hello all: I note in my application, that when I use Server.Transfer("somepage.aspx"), when the new page is loaded, and I click the Back button on the browser, that the previous page, when it...
3
by: Shimon Sim | last post by:
Hi Is it possible to make sure that the page doesn't show in browser history and won't effect Back button. The problem is that every postback shows as another entry for "Back" button and user...
2
by: Liming | last post by:
Hi, I have a multiview (with 10 views inside). Now on View2, I ask the user to uplaod a file and click Save to go to View3 and once they get to view3? If the user hits my "previous" button,...
5
by: ns21 | last post by:
How can the browser back button be disabled If the form is submitting information to other pages or submitting to itself or using redirections. I tried the tweaks like history.forward(1) in each...
15
by: tshad | last post by:
I was looking for a way to handle refreshes (user pressed refresh button) and found a piece of code to check if a Web page was refreshed but I can't get it to work. The code is:...
6
by: hemant.singh | last post by:
Hi all, I am trying to get a way by which I'll know exactly when user goes out of my site by clicking on close button in browser, So that w/e user click close button in browser, I can send a...
0
by: toeffetommy | last post by:
Hello, I need a piece of functionality developed for our Website and I need some technical advice on how get there. Essentially, what I want to develop is a browser-within-browser...
1
by: Randy | last post by:
I have an application with a datagrid and a button to export the grid to excel. For the most part this is working fine. Here's the export method: Private Sub btnExcel_Click(ByVal sender As...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.