adding some random number it works, but only for img
<img src="example.jpg?377489229" />
Is there any way to prevent caching prp. background-image?
<div style="background-image: url(example.jpg )"></div>"
The same technique will work there.
<div style="background-image: url(example.jpg?377489229)"></div>
Assuming your server doesn't act differently with the presence of that GET param.
This will only break the cache once though, if you want it to always hit the server, you will need to use some different techniques.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With