I have an ashx file handler that generates my images.
<img src="www.mywebsite.com/action/getimage.ashx?imageID=f8be4bf6&width=100&height=700&bgcolor=999" />
All of this works great.
Now I want to use lazy loading. Using this jquery lazy loading plugin
So, I adjusted my html images as follows:
<img src="imageplaceholder.gif" original-data="www.mywebsite.com/action/getimage.ashx?imageID=f8be4bf6&width=100&height=700&bgcolor=999" />
And added the following script:
$(function() { $("img").lazyload(); });
I noticed that on the Network tab of google chrome devoloper tools there are two calls to this file handler.
I created a test script here: link If you scroll down this violin, you will see two image requests when the image is uploaded to Google Chrome. In Firefox and IE, this only works with one call.
Is there any way to avoid this behavior?
UPDATE:
The following headers are set in the file handler:
[0] "Server" "Microsoft-IIS/7.5" [1] "Set-Cookie" "lang=nl; expires=Tue, 04-Feb-2014 13:08:56 GMT; path=/"
And the Expires property of the Response object:
context.Response.Expires = 0
source share