html / asp - 页面禁止缓存方法

知识共享许可协议 版权声明:署名,允许他人基于本文进行创作,且必须基于与原先许可协议相同的许可协议分发本文 (Creative Commons

前言

有时候我们不需要页面进行缓存,那么可以通过以下方式实现。

html

// HTML
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
<META http-equiv="expires" content="0">

asp

// ASP
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
clip_image005[1]Response.cachecontrol = "no-cache"

猜你喜欢

转载自blog.csdn.net/weixin_44198965/article/details/94335949