Why doesn't Safari honor my cache-control directive?

后端 未结 2 1961
轻奢々
轻奢々 2020-12-17 19:40

There is a particular page that I would like the browser to always load, particularly when the user presses the browser back button to get to it.

So I use the follow

相关标签:
2条回答
  • 2020-12-17 20:19

    The answer is to include the following attribute in the body tag to force Safari to reload the page:

    onunload=""
    

    As in:

    <body onunload="">
    

    I found this here: Safari browser ignoring my no-cache

    Which in turn got it from this thread: Is there a cross-browser onload event when clicking the back button?

    0 讨论(0)
  • 2020-12-17 20:36

    Also see this Webkit bug report: https://bugs.webkit.org/show_bug.cgi?id=71509

    I am experiencing the same issue, and it appears to be to be a bug in Safari.

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