0
votes

I see quite a lot posts with regards to this topic but still can't find a solution for my case.

I want to leverage the caching of the images for our web site (hosted in IIS 7.5). I did configure the caching through "http response headers" menu in IIS management console and it works for images with "absolute" src like <img src="images/logo.png" alt="Logo"> but it doesn't work for images with JSON source e.g. <img alt="Image" src="http://myhost.com/site/Services/Service.svc/images/im0002/thumb" > that is set dynamically in the ajax callback.

Detailed request/response headers:

Request URL:http://myhost.com/site/Services/Service.svc/images/im0002/thumb
Request Method:GET
Status Code:200 OK

Request Headersview source
Accept:/
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Host:myhost
Referer:http://myhost/site/Default.aspx
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11

Response Headersview source
Content-Length:1392
Content-Type:image/jpeg
Date:Fri, 27 Jul 2012 07:37:25 GMT
Server:Microsoft-IIS/7.5
X-Powered-By:ASP.NET


Any information about how to fix that is highly appreciated.

1

1 Answers

0
votes

Convert your image into Base64 or anything similar. It will be a string by then, no longer a url.