Home>Article>Web Front-end> How to implement the back force refresh function on WeChat web side (detailed tutorial)

How to implement the back force refresh function on WeChat web side (detailed tutorial)

亚连
亚连 Original
2018-06-01 15:14:15 1800browse

This article mainly introduces the implementation code of the back force refresh function on the WeChat web side. Friends who need it can refer to it

The specific code is as follows:

•The history object in h5 used by the android side,history.replaceState(null, null, "/currentURL?a=" uuid());changes after the page is loaded The current url (spliced with a uuid or random number), so that every time you go back, the browser will reload if it finds that the current url does not exist in the browser cache.
•But the ios side does not support the above method, so I used a piece of jquery code to solve it.

The above is what I compiled for everyone. I hope it will be helpful to everyone in the future.

Related articles:

vue axios request interception example code

Use vue2 to implement shopping cart and address selection functions

Angular development practice server-side rendering

The above is the detailed content of How to implement the back force refresh function on WeChat web side (detailed tutorial). 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