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" />
This all works fine.
Now, I want to use lazy loading. Using this jquery lazy loading plugin
So i adjusted my html images like this:
<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 in the network tab of google chrome devoloper tools that there are two calls made to this filehandler.
I've created a testing fiddle here: link If you scroll down on this fiddle you'll see two image requests when the image is loaded in Google Chrome. In Firefox and IE this works with only 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 is:
context.Response.Expires = 0