How to stop chrome from caching

后端 未结 2 2020
温柔的废话
温柔的废话 2020-12-08 04:23

I need to force the browser to reload the previous page from the server when the user presses the back button.

I\'ve added the following to my response headers:

相关标签:
2条回答
  • 2020-12-08 04:35

    This is not proper, but perhaps you could use the Javascript history object to determine if the current page is the last page in the list? If not, the back button was pressed.

    See this reference: http://www.exforsys.com/tutorials/javascript/javascript-history-object-properties-and-methods.html

    The real solution of course is to structure your application in such a way that usage of back/forward buttons actually work the way they are supposed to.

    0 讨论(0)
  • 2020-12-08 04:43

    as per this bug report in chromium repo, users find that using no-store instead of no-cache will fix it in chrome.

    0 讨论(0)
提交回复
热议问题