How to prevent browser image caching in HTML?

Posted by Pinki | Updated on

If you want to prevent browser image caching in HTML? Expanding on the previous comments, add the image with a time stamp, like so:

_spPageContextInfo.webAbsoluteUrl is the URL of the current sharepoint web, whereas ?rev=”+new Date().getTime(); appends the timestamp to the filename, ensuring it’ll be loaded from server on every page load.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers