On 11/12/07, Alex Brelsfoard <[EMAIL PROTECTED]> wrote:
> Hey all,
>
> I know this is not so much a JavaScript group, but I figured someone
> might have heard of what I am running into.
> If not, feel free to ignore this message.
>
> Situation:
> I am using JavaScript to create an image.
> It needs to be loaded, and i need to see its request in the apache logs.
>
> Problem:
> The code I am using works in every situation except on IE7 on Windows
> (the image loads and exists in the temporary internet files folder,
> but there is no request for the image in the apache logs).
> I have found a way to make it work in IE7, but the solution confounds me.
>
> Original code:
> var img_src = ......;
> var my_img = new Image(1,1);
> my_img.src = img_src;
>
> [That's the code that works everywhere but in IE7]
>
> The Fix:
> var img_src = ......;
> var my_img = new Image(1,1);
> my_img.onload = function() {}
> my_img.src = img_src;
>
> Here's the REALLY interesting point: I can replace 'onload' with
> 'onerror' and it works.
> But if I do not have that onload or onerror, I do not get the image
> request in my logs.
>
> Does anyone have any idea how/why this might happen?

Obvioulsy IE 7 has a more aggressive caching algorithm, and your extra
function gets in the way of that algorithm.  For further details we'd
have to know the details of said caching algorithm.

(As Tom Metro says, your technique should be regarded as unreliable,
even though it works now.)

Cheers,
Ben
 
_______________________________________________
Boston-pm mailing list
Boston-pm@mail.pm.org
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to