设置html页面不让浏览器缓存的方法_html/css_WEB-ITnose

WBOY
Release: 2016-06-21 09:10:39
Original
1444 people have browsed it

在html头中加入以下3句话,可以防止大部分浏览器缓存<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 1997 08:21:57 GMT">或者js中加入类似下面的代码,让每次的链接都不一样var s=Math.random()*10;     document.getElementById("checkCodeImg").innerHTML="<img  src='/checkcode.jsp?rnd="+s+"'/ alt="设置html页面不让浏览器缓存的方法_html/css_WEB-ITnose" >";
Copy after login


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template