网页缓存头部设定

HTM网页

不要缓存

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

 

需要缓存
<meta http-equiv="Expires" content="Wed, 26 Feb 2015:21:57 GMT">
<meta http-equiv="Cache-Control" content="max-age=315360000">

 

ASP网页

Response.Expires= -1
Response.ExpiresAbsolute = Now() - 1
Response.cachecontrol = "no-cache"

PHP网页

header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");

你可能感兴趣的:(网页缓存头部设定)