After a website is built, two templates are switched, but there is a cache and the effect cannot be viewed immediately. you need to re-register the website. how can this problem be solved for a website and two templates are switched, however, if there is a cache, you cannot view the effect immediately. you need to re-register it. how can this problem be solved?
Reply content:
After a website is built, two templates are switched, but there is a cache and the effect cannot be viewed immediately. you need to re-register the website. how can this problem be solved?
In my opinion, you can prompt the user to log on again based on the detection template status change.
Find the reason for caching. do you want to disable caching based on the events you switch. This will automatically update based on your usage.
If it is a server cache, you can perform a delete operation during the switchover.
If it is the cache of the local browser, you do not know how to do it.
Add a random number after the request file name.
Cache is a measure of its built-in QQ browser kernel, but you try to changeEtag
In this way, the browser finds two times before and afterEtag
The difference will not be read from the cache, but will be retrieved from your server again
It has its own cache. it is recommended that the template be switched on the front-end and the data be loaded asynchronously.