Developer forum

Forum » Templates » Caching off for an individual image

Caching off for an individual image


Reply
Hi,

We are having a bit off a problem with the DynamicWeb caching. Off course for performance we need this function. But there is one image (an animated gif) that we don't want to be cached.

Is there a way to turn off caching for an individual image?

Thanks in advance!

Gr. Matthijs

Replies

 
Nicolai Høeg Pedersen
Reply
It is the browser that caches images - not Dynamicweb.

If you do not want to cache an image you can do 2 things:

Add a timestamp to the source using javascript:
<img src="image.gif?ts=123412342435345" where the number is either the javascript or .net ticks number of a datetime object.

Indside IIS, you can on the properties of that file, set the cache header to not allowing browser cache: http://www.google.com/#hl=en&source=hp&q=iis+disabling+cache+image&aq=f&aqi=&aql=&oq=&gs_rfai=&fp=ca6b5a4f84435186

 

You must be logged in to post in the forum