Home WeChat Applet WeChat Development Detailed instructions on how to cancel cache on WeChat browser

Detailed instructions on how to cancel cache on WeChat browser

Mar 16, 2017 pm 02:40 PM

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 and

Debugging 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.

The code is as follows:

<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" />
Copy after login

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!

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)