quicksnow

web开发的人经常chrome和firefox作为开发调试工具,有些时候需要禁止chrome浏览器缓存,最近也用到禁止缓存,以下介绍几种禁止chrome浏览器缓存的方法作为记录。

HTML:   
<META HTTP-EQUIV="pragma" CONTENT="no-cache">   
<META HTTP-EQUIV="Cache-Control" CONTENT="no-store, must-revalidate">   
<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">   
<META HTTP-EQUIV="expires" CONTENT="0">   
  
ASP   
response.expires=0   
response.addHeader("pragma","no-cache")   
response.addHeader("Cache-Control","no-store, must-revalidate")   
  
PHP   
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");   
header("Cache-Control: no-store, must-revalidate");   
header("Pragma: no-cache");   
  
JSP:   
response.addHeader("Cache-Control", "no-store, must-revalidate");   
response.addHeader("Expires", "Thu, 01 Jan 1970 00:00:01 GMT");  

 

分类:

技术点:

相关文章:

  • 2021-11-21
  • 2022-02-09
  • 2021-12-26
  • 2022-12-23
  • 2021-08-06
  • 2021-12-03
  • 2021-08-11
  • 2022-02-08
猜你喜欢
  • 2021-10-20
  • 2021-11-21
  • 2021-11-22
  • 2021-11-22
  • 2021-07-20
  • 2021-10-16
  • 2021-05-30
相关资源
相似解决方案