【问题标题】:How to clear page cache when hitting back button on browser (IE,Chrome,Firefox Safari)?在浏览器(IE、Chrome、Firefox Safari)上点击返回按钮时如何清除页面缓存?
【发布时间】:2015-07-27 19:36:32
【问题描述】:

在MVC4中点击浏览器(IE,Chrome,Firefox Safari)上的后退按钮时如何清除浏览器的缓存。尝试使用以下代码,但它不起作用 How to refresh page when hitting back button on browser (IE,Chrome,Firefox Safari)?

你们能帮我做这件事吗?

谢谢, 苏布奈。

【问题讨论】:

    标签: model-view-controller


    【解决方案1】:

    您需要通过在HTML > Head 中指定它来告诉浏览器丢弃旧页面并从服务器获取最新页面

    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="-1" />
    <meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate" />
    

    【讨论】:

      猜你喜欢
      • 2011-10-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-04-21
      • 2020-08-05
      • 2012-04-08
      相关资源
      最近更新 更多