Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IE7 Back Button loses history in .NET application

In maintaining an ASP.Net application, I've come across an unusual problem with the Back Button in IE7. After selecting a few links to the aspx pages and then pressing the Back Button once, IE's Back Button greys out and the drop-down Quick History contains no more entries. This is obviously incorrect since multiple links were clicked to get you to that point. Opening the actual History shows the complete trail, but for some reason the Back Button just can't figure out that there are more pages.

Now for some details:

  • .NET 2.0
  • Setup uses a Master page that has disabled page caching (HttpCacheability.NoCache)
  • The page utilizes Prototype Ajax libraries to load dynamic content. The pages in the history aren't dependent on the Ajax calls though, they use a static URI to load a specific piece of information and the Ajax calls just load contextual information. In other words, every page in the History has an actual URL, not something an Ajax call is modifying
  • Problem does not occur in Firefox

I've done the requisite Google search and came up with a few hits, but they mostly said either "That's just how IE is" or "Use a REAL browser like Firefox" neither of which are helpful. Can anybody shed some light on this issue?

Thanks!

like image 225
dball917 Avatar asked Nov 26 '25 17:11

dball917


1 Answers

Is your Ajax library actually contributing to the browser's history, though? Most Ajax libraries have ways of dealing with this. jQuery has a history plugin, Microsoft's Ajax has a History control..

like image 74
Nicholas Head Avatar answered Nov 29 '25 11:11

Nicholas Head



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!