html不缓存设置

html-css03

html不缓存设置,第1张

HTTP协议中关于缓存的信息头关键字包括Cache-Control(HTTP1.1),Pragma(HTTP1.0),last-Modified,Expires等。

设置响应请求头为 Cache-Control: no-cache,max-age=0

保证了html不缓存,这样资源文件只需要在后面拼接时间戳或者版本号就能实现该缓存时缓存,页面更新时保证更新

<meta

http-equiv="Pragma"

contect="no-cache">是用于设定禁止浏览器

从本地机的缓存中调阅页面内容,设定后一旦离开网页就无法从Cache中再调出;