A
A
Andrey Chereshnev2020-07-17 11:41:39
caching
Andrey Chereshnev, 2020-07-17 11:41:39

How to update files on the client if it has changed on the server?

When I upload files to the server and go to the site, the site (html, css, js and media files) is updated only after a refresh.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
O
Olga Svistunova, 2020-07-17
@Andryhv

Oh, how many options there are. For example, you have caching enabled in your server settings, you can see it in the browser console in the headers. Or some other add-ons are used, for example, there is a generator of static pages and they are given. Or there is memcached\redis\software for caching parts of the site and the site logic is set up cunningly. No one knows what you have there :)

A
allaga, 2020-07-17
@allaga

try gulp

V
Valentine, 2020-07-19
@Tpona

If files should not be cached, you can configure this in htaccess for certain types of media files, or simply add the ?t=Time in milliseconds parameter to the download link for files that should not be cached, for example.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question