Answer the question
In order to leave comments, you need to log in
How to clear the cache on the site?
The client has a WordPress site. There are no caching plugins. But when the page is refreshed, then the desired picture (which is loaded on the server) flies out, then its previous copy (Which does not exist on the server). The path to them is the same.
Similarly, when you load styles, they are not updated. Although this is not the case with php files.
Answer the question
In order to leave comments, you need to log in
Cached on the hosting side.
For CSS add to .htaccess
<FilesMatch ".(css)$">
Header append Cache-Control "no-store, no-cache, must-revalidate"
</FilesMatch>
Try watching with a different browser. If everything is in order in it (I think it will be), then clear the browser cache through its settings
The cache is always a problem, so advanced developers have long learned to force it to be demolished using the file version. Each new build changes the version, for example from 1 to 2. Next, add the version to the static resource path, something like this:
<img src="image.png?v=2" alt="" />
<!-- или генерируем имена файлов с учетом версии -->
<img src="image_v2.png" alt="" />
<link rel="stylesheet" href="https://habracdn.net/toster/frontend.47dba5ea-12bc-11e6-81cb-38eaa71001f0.css">
The problem may be in the loadbalancer/varnish.
As an example: the content is stored on different servers and, accordingly, it is loaded from one (where it has already been updated), then from another (where not yet).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question