开发者

IE8 Back Button Stops Working on ASP .NET Page

开发者 https://www.devze.com 2023-01-09 17:09 出处:网络
If you do a search for \"ie8 back button disabled\" you\'ll see a number of blogs with people having difficulties with the Internet Explorer version 8 back button becoming disabled.This now happened t

If you do a search for "ie8 back button disabled" you'll see a number of blogs with people having difficulties with the Internet Explorer version 8 back button becoming disabled. This now happened to o开发者_如何学JAVAne of my ASP .Net pages. The page uses a user control, aspx page, and a master page. It uses no redirects and seems to be happening when I click the back button and then the forward button (after the forward button is clicked, it does not fire the Load event and the back button becomes disabled). Has anyone else encountered this and do you have a solution for it?


It uses no redirects

Perhaps you should try a few. It's a best practice to do a redirect after any postback that causes a "transaction" (the definition of transaction is in the eye of the beholder). One of the benefits of this is that it's much easier for the browser to know where you are as far as the back and forward buttons are concerned.


This is most likely the result of cache and history directives in the http headers. Pay particular attention to no-cache and no-store headers, and read about their effects (and non-effects) in differing browsers. I wish I could point you to a definitive source on the matter, but solid information about these headers is seriously lacking on the internets. Many will point you at the latest HTTP RFCs, but unfortunately browser vendors - as usual - have their own unique take on RFCs.


We've had the exact same problem.

Bottom line, the problematic page a a gigantic, bloated viewstate, which somehow caused IE to "forget" the page whenever a user would click 'back' and then 'forward'.

We tried following this answer (i.e. using no-cache and no-store headers), but it didn't work.

What did work was simply cutting down on the the amount of data sent to the page.
Not exactly the perfect solution, but it's better than nothing.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号