I found most solutions are adding “?+time()” after the image link to force browser download image every time, however, this seems not an ideal solution if no real change on image.
Could the ifModified in .ajax give a help?
Any ideas are welcome, thank you!
Edit:
Is there any ways without appending “?+…” to the image ink?
And consider the image may be remote resource.
The ideal would be, that you append file modification time (on the server) or the ** PHP filemtime()** timestamp. This way, only when you change image on the server, the timestamp changes and all users immediately (on next load) get new version of the image.
But you have to use server-side language, like PHP. Google “filemtime()” for more info.
Representative xample:
or:
You can also write a function to do that for you: