I tried both synchronous and asynchronous modes. Here are my findings:
1. In synchronous mode, I'm able to prefetch subsequent pages but the
browser freezes for a few seconds, it's not an ideal situation. It
happens with all browsers I've tested. Here's an example that
prefetches pages in synchronous mode:
http://jsite.dreamhosters.com/preloa...nchronous.html
and here's the line that I use: xmlHttp.open("GET",pages[i],true);
2. In asynchronous mode, I'm unable to fetch pages, it seems the loop
is executed right away without fetching anything. I don't understand
very well what happens behind the scene. But at least the browser
doesn't freeze! Here's an example that uses asynchronous mode:
http://jsite.dreamhosters.com/preloa...nchronous.html and that
doesn't work. Here's the line that I use:
xmlHttp.open("GET",pages[i],false);
What do you think I can do to prefetch pages in asynchronous mode?
Thanks.