Home > Article > WeChat Applet > Detailed instructions on how to cancel cache on WeChat browser
This article mainly introduces the detailed description of the method of canceling the cache of WeChat browser. This article uses meta header information to cancel the cache of WeChat browser, which is often used especially during development. It needs Friends can refer to the following
When making a WeChat official account andDebugging the mobile page, it is inevitable that the page will jump to the WeChat browser to open the debugging stage, android The WeChat browser has always cached htmlstatic resources by default. Every time the static resources change or even when new content is released, it is very likely that the WeChat browser cannot be updated, and many times it has to You have to clear the WeChat cache to see the effect, which is very annoying. Some customers have installed QQ Browser, and WeChat actually calls QQ Browser. Sometimes even clearing the WeChat cache is ineffective, and the QQ Browser cache must also be cleared.
After some exploration, the WeChat browser does indeed cache the upper layer of the webview: that is, if the request passes this address, it will be stored locally and will not be retrieved online later.The solution is to add the following header information during the debugging phase or frequently updated pages.
<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" />Well, in this way, the WeChat browser will treat this page It will be pulled online all the time.
The above is the detailed content of Detailed instructions on how to cancel cache on WeChat browser. For more information, please follow other related articles on the PHP Chinese website!