K
K
KirSupi2020-12-19 21:02:22
Nginx
KirSupi, 2020-12-19 21:02:22

How to clear user cache?

There is a project on create-react-app, which is built through it, but this miracle costs on the nginx server.
I fixed a few things, made a build, uploaded it to the server, but for users, the cached js was not automatically reset. What to do? How to reset user cache? It seems that I know that it is possible to attribute ?version=1 in html files when connecting js and css, but in the build it (index.html) is generated automatically and the devil will break his leg there, so changing it is extremely inconvenient. Mb there is some option how to do it at the expense of nginx?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
ky0, 2020-12-19
@ky0

You can generally tell the web server not to cache js files - but no one does that.
You are thinking in the right direction - adding a file version to the url, especially automatic - is what you need.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question