In our project we need to give continuous updates, after updating the system, users need to clear their cache and localStorage data manually so that they can use the updates.
Is there any way to deal with the problem, where after updates all the cache will be cleared for once when the user comes to the site? the project is built upon Nextjs.
2
Answers
you may use the function of the localstorage as:
You need to have a setting which takes the version ID, compare it, if different then clear local storage and set the newer version on local storage, something like this code should work.