[Project_owners] Image prefetching

Konstantin Svist fry.kun at gmail.com
Fri Apr 1 00:31:04 EST 2005


Don't forget, those images might've already been cached on previous
load.. or preloaded by FF itself :)


~Konstantin

On Mar 31, 2005 11:24 PM, Luca Minuti <lithian at tiscalinet.it> wrote:
> Hi Konstantin,
> 
> > Anyway, your problem is very simple - some of your images load BEFORE
> > your JS even gets to tmpImage.setAttribute(...).
> 
> No. The images are loaded from web pages and are big enough to take about
> half second to be displayed. I think the problem is another.
> 
> Now I'm trying this code
> 
> var imageList;
> function x()
> {
>   .......
>   imageList = new Array();
>   for ( ... )
>   {
>       var imageList[i] = new Image();
>       imageList[i].setAttribute("onload", "alert(this.src);");
>       imageList[i].src = ...;
>   }
> }
> 
> and seems to work well. So, I think the old version have some problem
> with the garbage collector.
> 
> Ciao,
> Luca.
> 
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org 
> http://mozdev.org/mailman/listinfo/project_owners 
>


More information about the Project_owners mailing list