开发者

Making sure a web page is not cached, across all browsers

开发者 https://www.devze.com 2022-12-21 10:41 出处:网络
You said you put these lines, but where and how do I put this in my html? I used those below, but they didn\'t work i开发者_开发技巧n all browsers

You said you put these lines, but where and how do I put this in my html?

I used those below, but they didn't work i开发者_开发技巧n all browsers

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

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">


Put them anywhere between <head> and </head>, but after the tag <meta http-equiv="Content-Type" ...> if there is one.


meta goes into the <head> of the document.

<html>
<head>
  <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
  <meta http-equiv="Pragma" content="no-cache">
  <meta http-equiv="Expires" content="0">
</head>
<body>
  <p>hi!</p>
</body>
</html>


They go in between <head> and </head>.

0

精彩评论

暂无评论...
验证码 换一张
取 消