IE8 Back Button Stops Working on ASP .NET Page

£可爱£侵袭症+ 提交于 2020-02-22 03:59:22

问题


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 one 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?


回答1:


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.




回答2:


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.




回答3:


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.



来源:https://stackoverflow.com/questions/3367241/ie8-back-button-stops-working-on-asp-net-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!