Struppi: wird bei new Image() automatisch vorgeladen?

Beitrag lesen

picture[i]=new Image();
picture[i].onload=loadcheck;
picture[i].src=image[i];

Hier gibt es ein Problem mit dem IE.

Ich weiß nicht ob du es schon mal bemerkt hast, im IE kommt es bei solchen preloadern immer mal wieder zu hängern. er beeendet den preload nicht, drückt man dann F5 funktioniert dann scheinbar alles wieder.

In dem preloader von http://www.howtocreate.co.uk/jslibs/htmlhigh/imgpreld.html wird beschrieben woran das offensichtlich liegt:
/* Officially, if the image is already in cache, onload will not fire. It does in Internet Explorer. If this is Internet Explorer or due to some fast connection, the image has managed to load since the last line of code, then the onload function will be executed twice, doubling the image count. This will cause the new URL to be loaded before all images are cached. The onload function includes a check to see if this image has already triggered the onload function and if it has, it does not increase the count. */

seitdem funktioneren meine Preload skripte im IE (bisher) einwandfrei.

Struppi.