Home >Web Front-end >HTML Tutorial >Solutions to various stubborn caches such as WeChat cache and browser cache_html/css_WEB-ITnose

Solutions to various stubborn caches such as WeChat cache and browser cache_html/css_WEB-ITnose

不言
不言Original
2018-05-25 14:52:362247browse

No? Oh, let’s just talk about the method:

When updating files, add a version number to the statements that reference css, js and other files, which can effectively prevent the browser from always Use the css in the cache, js

Example:

<link href="/html/superstore/css/SuperStore.css?201410281" rel="stylesheet">

The red part above is the key, just change it every time

However, this may be referenced in the form of parameters. I don’t know if there will be any trouble with parameters when quoting js. It has not been tested yet

ps: Finally, complain about browsing WeChat The seriousness of the cache on the device is really unprecedented!

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