Which browsers' back button does not generate request to the server?

你离开我真会死。 提交于 2019-12-30 06:42:06

问题


I need to test my web application against a browser for which back button doesn't generate request to server.

Could you give me examples of such browsers?


回答1:


That doesn't depend on the browser used, but on the HTTP response headers sent to it. If the browser is by the response headers instructed to cache the page, then it will cache the page. But if it is instructed to not cache the page, then it will not cache the page and fire a real request.

You have control over the response headers on the server side.




回答2:


Internet explorer 6, not sure about 7/8. Make sure you dont have the following meta statements in your header (they will force page reload):

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">

Check this page for more info:

http://support.microsoft.com/kb/234067



来源:https://stackoverflow.com/questions/2722261/which-browsers-back-button-does-not-generate-request-to-the-server

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