Home  >  Article  >  Web Front-end  >  How to disable caching in html5

How to disable caching in html5

青灯夜游
青灯夜游Original
2021-05-17 14:08:113970browse

You can use the meta tag to disable caching in html5. You only need to set the values ​​of the "HTTP-EQUIV" attribute to "pragma", "Cache-Control" and "expires" in the tag, which correspond to The values ​​of the CONTENT attribute are "no-cache" and "0".

How to disable caching in html5

The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.

html5:

<HEAD> 
<meta HTTP-EQUIV="pragma" CONTENT="no-cache"> 
<meta HTTP-EQUIV="Cache-Control" CONTENT="no-store"> 
<meta HTTP-EQUIV="expires" CONTENT="0">
</HEAD>

chrome:

Now the new version of Chrome is in the Settings of developer Tools (F12 brings it up) ( There is a Disable cache option in the lower right corner (there is a gear logo). Just tick it.

Recommended tutorial: "html video tutorial"

The above is the detailed content of How to disable caching in html5. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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