Posted on: 11/21/2011 12:46:58 PM | Views : 237

Hi all
I have created an ImageHandler to dynamically serve images around my site. I use this becuase many of my images require several different sized versions - using this imagehandler means I only have to create the image once.
The problem I have is that the image just won't cache on the clientside. If I run the script by browsing to the ashx directly (passing in image URL and size), I get a 200 OK every single time I refresh. A standard image gives me the 200 when I first load, then 304 Not Modified when I refresh.
Having Googled it, there are a couple of suggestions which seem to work for the OPs, but none of them work for me. I have included the code from my ashx below, and call it by browsing to (eg) image.ashx?ImageURL=/images/theimage.png&Height=30.
It's worth noting that the serverside caching works correctly, it's just the clientside I am struggling with.
You will see my attempts at getting this working in the constructor sub bel ...

Go to the complete details ...