views:

366

answers:

3

Hi,

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!

A: 

If "Setup uses a Master page that has disabled page caching (HttpCacheability.NoCache)" then this is probably the reason. Try allowing cache again and see if that works.

CRice
Thanks for the response. We've removed the NoCache and the problem persists.
dball917
+1  A: 

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

Nicholas H
A: 

It's the Ajax component, you are refreshing parts of a single page. You are not reloading the page everytime. Page reloads are another full request from the server, even if it is requesting the same page, you have submitted different information and the code behind is probably using this data to render the page differently.

When using Ajax you are having some control over which part of the page is reloading but this is all done with javascript, somewhere, somehow and as such you are not populating the browsers history records in the normal manor. It is true different browsers will handle this differently.

Robert