location匹配禁止页面缓存

php禁止页面缓存的办法

//设置此页面的过期时间(用格林威治时间表示),只要是已经过去的日期即可。

add_header Expires: Mon, 26 Jul 1997 05:00:00 GMT ;

//设置此页面的最后更新日期(用格林威治时间表示)为当天,可以强制浏览器获取最新资料

add_header Last-Modified: ' . gmdate('D, d M Y H:i:s').' GMT ;

//告诉客户端浏览器不使用缓存,HTTP 1.1 协议

add_header Cache-Control: no-cache, must-revalidate;

//告诉客户端浏览器不使用缓存,兼容HTTP 1.0 协议

add_header Pragma: no-cache ;

ASP禁止页面缓存的办法

add_header expires=0
add_header Pragma "no-cache";

add_header Cache-Control no-cache must-revalidate;

JSP禁止页面缓存的办法

add_header Cache-Control no-cache;

add_header Expires "Thu, 01 Jan 1970 00:00:01 GMT";

猜你喜欢

转载自www.cnblogs.com/zhangan/p/10880405.html