D
D
dienerie2021-12-20 10:27:41
HTML
dienerie, 2021-12-20 10:27:41

How to clear the cache of the downloaded file on the site?

We update the file on the site, by clicking the download button it is downloaded.
Normal html page.
The bottom line is that when we update the file, the old one is downloaded from the page. Only clearing the cache helps.
Users will not clear the cache themselves every time, what should we do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2021-12-20
@dienerie

Either send headers with the file that prohibit caching ( Cache-Control: no-cache), or add a random string to the address as a parameter ( http://example.com/file.name?45qdf).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question