Home >Backend Development >PHP Tutorial >javascript - I built a WeChat website and switched between two sets of templates, but there is a cache and the effect cannot be viewed immediately. I have to log in to WeChat again. How to solve this problem?
I built a WeChat website and switched between two sets of templates, but there is a cache and the effect cannot be viewed immediately. I have to log in to WeChat again. How to solve this problem?
I built a WeChat website and switched between two sets of templates, but there is a cache and the effect cannot be viewed immediately. I have to log in to WeChat again. How to solve this problem?
Personally, I think the user can be prompted to log in again based on the status change based on the detection template.
Find the cause of the cache and see if you can not clear the cache based on the event you switch. This will automatically update based on user usage.
If it is the server's cache, it can be deleted when switching.
If it’s the local browser’s cache, then I don’t know how to fix it.
Add #random number after the request file name. I don’t know if it will work
WeChat cache is a measure of its built-in QQ browser kernel. You can try to change the etag
for each request, so that the browser finds that the two etag
are different and will not read from the cache but from the cache again. Get it once on your server
WeChat has its own cache. It is recommended to switch templates on the front end and load data asynchronously