X
X
xmoonlight2013-01-30 12:21:49
PHP
xmoonlight, 2013-01-30 12:21:49

How to disable caching when serving a specific image?

Welcome all.

There is an image file (http://site.com/image.jpg), which is replaced by scripts on the site from time to time (updated).
It is necessary to completely disable the caching of this image in order to always see the current one from the server when the browser requests the image.
It needs to be done through .htaccess.

Tried many methods - doesn't help... (have to press Ctrl+F5, etc. to refresh...)

In advance, Thank you so much for your help.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vitaly Zheltyakov, 2013-01-30
@VitaZheltyakov

It's easier to change the image name with scripts. For example like this:"captcha.jpg?id="+Math.random()

F
Fyodor, 2013-01-30
@Richard_Ferlow

Are you sure it's not the browser caching?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question