Clicking back button on browser loses session information


I have had several scenarios where a user has pressed the back button and the information in a session has been lost. 

Has anyone else experienced this?

How do I get around this?


"Man is the best computer…and the only one that can be mass produced with unskilled labour”
5/5/2009 2:50:44 AM 93655 articles. 6 followers. Follow

7 Replies

Similar Articles

[PageSpeed] 16
Get it on Google Play
Get it on Apple App Store

Explain a bit more what happens. Do you logout? or Session variables are null?


MAKMark as Answer if this reply helps you
ASP.Net Hosting : Host DepotMy Site : ASPSnippets
5/5/2009 5:23:15 AM
If the user clicks the back button it won't clear the session.  What you may be experiencing is if the user sits on the page for an extended period of time, the session may have timed out.

Malcolm Sheridan
Microsoft Certified Solution Developer
Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as
Answer" if a marked post does not actually answer your question.
5/5/2009 5:30:50 AM

 What you have right in you page which is called in back button

Pankaj Gohel

Please Mark as Answer if you find the post useful.
5/5/2009 5:35:08 AM

I have a wizard which has 5 steps. At step 5 all the information that is saved in a session gets saved to a database.

Sometimes and I can't reproduce it when a user gets to the final step the information that was stored to a session in previous steps (You can't go to the next step unless all information is filled in) is not there anymore and the user gets taken back to normally the first step because all the information in a session has disappeared.

Does that make sense?

It maybe a timing session, but the session has 15 minutes.

Any clues?


"Man is the best computer…and the only one that can be mass produced with unskilled labour”
5/5/2009 5:42:06 AM

 add this in ur page..

<%@ OutputCache VaryByParam="None" Duration="120"%>

i hope u re looking for cache..

go through this

5/5/2009 5:50:57 AM

It may be a timeout issue.  Users may sit on the page for longer than 15 minutes. 

Another avenue to check is if you're using an Application pool in IIS, that could be recycling itself and cause the session to be cleared.

Malcolm Sheridan
Microsoft Certified Solution Developer
Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as
Answer" if a marked post does not actually answer your question.
5/5/2009 6:02:56 AM

Increase the session time and check if you have somehow disabled the ViewState property.

Bind GridView to Dynamically created DataTable | Bind DataTable to DropDownList

My Blog
5/5/2009 6:15:33 AM

Similar Artilces:

Clearing the session when the Internet browser back button is clicked.
Hi,Is it possible to clear the session when the Internet browser back button is clicked? or if you know another work around I would greatly appreciate the help, thank you very much. Boogie Hi,If you have not expired the Response object, then clicking Back button will only display the page cached in the browser, there will be no server hit. You can expire the Response object (using Response.Cache.SetExpires() method) in the code so that if users click the Back button, your page loads again and will execute any code (like clearing sessions).Hope this helps,VivekSocial Networking Pl...

Keep values on a web form when click button back?
I have a form on step1.aspx When I click the button I do a server.transfer (step2.aspx, true) If I use click the back button I have in my page_load of step1.aspx the following: string Email = (string)Session["txtEmail"]; Now if I want to populate or set (keep) the textbox value to what the user entered, what should I do. I can see the value of Email, by doing a Response.Write(Email); Now, I just have to make sure that the textbox is not empty. I tried the following: <script language="C#" runat="server"> // De...

Error page after clicking back button form Browser
hi, we are facing a strange issue. after we login to the portal successfully through NAM, if we click the browser back button from there it shows up an error page. i am also attaching the error page in the post. kindly help us to resolve this issue as this is Urgent. +----------------------------------------------------------------------+ |Filename: back button error.JPG | |Download: | +----------------------------------------------------------------------+ -- mukundpareek ...

How to clear session when user clicks on back button of browser
Hi All, I have the login.aspx and main.aspx. when user logs in i am redirecting him to main.aspx. Problem : In main.aspx when user clicks on back button of browser, he is navigated to login.aspx page and when he clicks forward button of browser in login.aspx, again he is navigated to main.aspx just as he gets log in. Please help me how to solve this issue...I need to clear the session when user click on back button when he is viewing main.aspx but what is the procedure to do it... Thanks, PraveenThanks,Cute   Session.Clear();  Session.Abandon();  hope it h...

expiring the session when the browser back button clicked when we signout
hi, this is naveen.g  First i have a login form and some registerform and some other forms after completing all the things i go for signout the it is redirecting to login page but what is the problem is when i click browser back button all the data is visible it should not be visible. When we click back button of the browser it will redirect to another page saying that ur page has been expired i need the code it's very urgent plz thanx in advance Session.Abandon will clear all session data. In every postback create and renders a new page in browser, and browser back ...

How do I clear the contents of a form when the user clicks the back button on the browser?
Situation - I have a order form that submits, then shows a thank you with the order number Goal - to not allow user to go back to previous page when back button on browser pressed. Issue - when user goes back, values are still there and duplicate order can be placed. Thoughts/suggestions?"Sometimes I spend so much time going the wrong direction on a problem. K.I.S.I.S = Keep It Simple I'm Stupid :)"Matt Before submitting, have a quick look at when the user last submitted an order. If the time is less than a day away, check to see if the order is the same. If it is, popup ...

Help Needed: Browser BACK button click
Hi There, I would like to know if there is any way to load the web page from the server on browser BACK button click. Currently, on clicking the BACK button, the previous page is loading from the cache, so that the page_load event is NOT firing.  I tried clearing the cache. But then, "Page Unavailable. Click Refresh" message is coming.   Thanks in Advance, Ravi Asking user to Refresh the page seems to be a default IE property it seems. Can we override this? Try to disable caching by adding the below code in page_load event Response.Cache.SetCacheability(HttpCac...

ASPX Web Form window jumps when link button or button is clicked
Dear, i m senthil, and i m new to I m using with vb, my problem is, i m creating a forum, in all web pages while clicking any link button or command button the webpage jumps and the focus is going to some other controls. I want the page not to get jumped... Pls help in this regard. set the MaintainScrollPositionOnPostback property of your page to true. Banavige~~~~~~~~~~~~Need a site code sample in a different language? Try converting it with:

Could PB .NET Web Form POST security Information to others web page??
This is a multi-part message in MIME format. ------=_NextPart_000_00F9_01C9C4D5.8FB45C90 Content-Type: text/plain; charset="big5" Content-Transfer-Encoding: quoted-printable Hi,=20 Have anyone came across the requesion to POST security informations from = PB .NET web form web page to other web site?? I have tried many datys, Could any kind man give me some suggessions?? thanks & Best regards Leon ------=_NextPart_000_00F9_01C9C4D5.8FB45C90 Content-Type: text/html; charset="big5" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML P...

Web Form : Block the return button on the web form
Hello, I have a principal form with a list of information. From this form, I go on an edit forms and I want to control what is done on this form. For this, I want to block the button Windows back on my edit form. Somebody can help me ? Thank you for your help.  Jy. set the Session Variable (with your ID or whatever ) in the Principal Form when user click on Edit then put the One Back Button on your edit form and Redirect the page by using the Session variable value.Please Mark as Answred If This Blog has Helped You.RegardsMitesh Darjihttp://www.indianic.comhttp://www.mitatdotnet....

Button click on web form
I have button. I want a do two think of button click. Open page as a pop up form and redirect the main page to other page. Protected Sub btnsubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnsubmit.Click        If Len(Request.QueryString("request_send").ToString()) > 0 Then ----open pop up form with this link and then redirect to account.aspx page "https://do.test.appx?ID=" & Request.QueryString("request_sendtoicon") "&acc=" & Request.QueryString("cs_no") "&payon=2"      ...

Sessions and browser back button
The records that I am working on have an ID that are stored in a session. Everything has been working fine until the inevitable happened. Clients are starting to edit record1 and then the look at record2 later. For one reason or another, the use the back button to get back to the record1 edit screen and click save. It ends up saving record2 with record1s data. I have many web user controls on all my pages that feed off the session variable as well as the main content. How can I prevent this from happening? I would assume that I am not the only one that is having this problem.  I have be...

Urgent!!! Form inside Windows form control (that is embedded to Web page i.e aspx), not displayed on button click
 Hi all I have a Windows Form Control(i.e Windows Control Library), that consists of a Button "button1" and  a panel "panel1". Also I have a form "form1.cs". On form "form1.cs" I have a label whose text value i have set to  "Hi". On click of button "button1" on windows form control i am opening the form "form1.cs"  inside a panel and it displays "Hi". The code of windows form control is as below :  public partial class UserControl1 : UserControl    {    ...

How to preserve values in a web form when navigating to a different page and then going back to the original page using the back button ?
   I am working on a C#/ASP.NET web application. The web application basically consist of 3 web forms. Each form contains several controls such as an edit box, and some drop down list box controls. Basically I need to find out how to preserve the values in a web form when a person navigates to a different page. For example, suppose that in my web application I navigate from my first page (First.aspx) to my second page (Second.aspx). Now if I press the browsers back button, I want the application to retain the values for the controls that were in my first web form "first....

Web resources about - Clicking back button on browser loses session information -

Information - Wikipedia, the free encyclopedia
Information (shortened as info or info. ) is that which informs, i.e. an answer to a question, as well as that from which knowledge and data ...

InformationWeek – Latest Information Technology (IT) news & IT articles - Technology news - IT magazine ...
InformationWeek provides latest Information technology (IT) news online & articles and publishes latest tech news & IT magazine for Indian IT ...

Wye River bushfires: Clear information belies claims of a cover-up
&nbsp;Bushfire information, many questions and searches for answers.

Weekend Reading: David Warsh on Shapiro and Varian's "Information Rules"
... without... >...some bright new book fetching up on my desk promising to explain some aspect of the business dynamics of the new age of information.... ...

SharkCam provides viral video, 'groundbreaking' information
The drone made famous via attack from a great white shark has delivered a wealth of new information on the behaviour of these amazing predators. ...

Worldwide Information Technology Leader Cisco Joins the National Cyber ...
Worldwide Information Technology Leader Cisco Joins the National Cyber ... CNNMoney WASHINGTON, Jan. 12, 2015 /PRNewswire-USNewswire/ The National ...

J.K. Rowling Reveals The Secret Information She Told Alan Rickman About Severus Snape
J.K. Rowling has revealed the secret bit of information she once shared with the late Alan [...]

OpenSSH patches information leak that could expose private SSH keys
A vulnerability in OpenSSH clients could expose users' private SSH keys to rogue or compromised servers.

A Reader Sends Along Some Important Information Regarding Synthetic Weed
Synthetic weed! It’s all over the sports news cycle this week , but what is it? Is it the same thing as K2? What is spice? Can it kill you? ...

Fifty Bits Of Information To Help Us Adapt Our Intentions And Behaviors
Fifty Bits Of Information To Help Us Adapt Our Intentions And Behaviors

Resources last updated: 1/23/2016 1:45:26 PM