Hi guys
I have a little aspx file on my server which takes parameters jpg source, width & height. It then resizes the images down to a thumbnail.
It all works great. Except one problem... the browsers don't cache the files!
I've tried absolutely everything I can think of with the web.config file and I'm all out of ideas now. Below is a copy of the best I have been able to come up with so far.
Does anyone know if it's even possible to cache a specific aspx file? I'd prefer not to cache the whole folder either (though when I try setting the whole folder to cache, that also doesn't work for aspx files).
Thanks
Matt
<?xml version="1.0" encoding="UTF-8"?><configuration><location path="thumbnail.aspx"><system.webServer><staticContent><clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00" /></staticContent><httpProtocol><customHeaders><add name="Cache-Control" value="public" /></customHeaders></httpProtocol></system.webServer></location><system.webServer><caching><profiles><add extension=".aspx" policy="CacheForTimePeriod" kernelCachePolicy="CacheForTimePeriod" duration="365.00:00:00" varyByQueryString="width,height,source" /></profiles></caching></system.webServer></configuration>