There are possible scenarios that need image preloading. Most browsers only allow two concurrent requests at the same time to the same domain. When we do the image preloading on domready, it might hold up other resources that need to be loaded. Because we preload images that are not shown when the page loads, we can delay the preloading.
- Array.each.delay(3000,this,[
- ['foo.gif', 'bar.png','moo.png','tools.png', 'mootools.png'],
- function(src){var img = new Image();img.src = src;}
- ]);
No comments:
Post a Comment