0

I have an asp.net application and am experiencing a surprising behavior.

Whenever I leave one particular page in the application, The back button starts behaving in the following way:

hitting back (which should take me to the offending page) makes the current screen flash - as if going back - but then reloads the current page instead.

It doesn't matter how I leave that page I see this effect. If I click on a link on the offending page and hit back, same thing. If I am on the offending page and type in a new address in the address bar, then hit back, same thing. It doesn't matter if I go to another page in the same application or an external application, same thing.

I tried using fiddler to see what is going on, and all that I see when I hit back, is all of the external links (css, jquery, etc) get reloaded on the current site. I don't see a 320 from the offending page at all.

Note: disabling Active Scripts hides this symptom.

ajon
  • 7,868
  • 11
  • 48
  • 86

2 Answers2

1

Most likely the external page either is tampering with your browser history (via JS) and setting the same page as the last page in your history when the site is being loaded, or it has another page set between that redirects to the page you are seeing, and when you click back you are loading the redirect page again.

Try to disable JavaScript and see if it is still happening. If yes, try to analyse the first load of the page with fiddler and see if another page is redirecting you.

magnattic
  • 12,638
  • 13
  • 62
  • 115
  • I made an edit to clarify, that this is the behavior regardless to what site I link to in asp.net application, this tells me it is an issue with the asp.net website. However, you made a good point. I disabled javascript and the back button worked. I believe it has something to do with the script in the asp.net page. – ajon May 09 '13 at 15:16
  • I made another major edit. It turns out the link didn't have anything to do with the problem, and where I go had nothing to do with the problem. It is just this one page of the application. – ajon May 09 '13 at 15:26
0

False alarm:

This is an inherited project and I hadn't read all the code. There is javascript that says:

<script type="text/javascript">
    if (window.history.forward(1) != null)
        window.history.forward(1);
</script>

Problem solved.

ajon
  • 7,868
  • 11
  • 48
  • 86