How to prevent content being displayed from Back-Forward cache in Firefox?

前端 未结 4 1993
既然无缘
既然无缘 2020-12-03 11:42

Browser: Firefox 6.0

I\'ve Page A with the following setup to make sure the content is NOT stored in the bfcache of the browser:

1) $

4条回答
  •  隐瞒了意图╮
    2020-12-03 12:15

    If you set Cache-Control: "no-cache, no-store, must-revalidate" to http headers the page won't be cached in back-forward cache.

    Firefox also considers event handlers on beforeunload event as a signal to not store page in BFC, but Safari ignores such handlers, so it's better to set correct http headers to indicate the nature of the page content (cacheable or variable)

提交回复
热议问题