Current time: 07-02-2020, 05:42 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Preloading JavaScript Images
06-24-2010, 05:12 AM
Post: #3
RE: Preloading JavaScript Images
Hey Guys,

Here are some before and after shots. The test page content is dynamic each time it loads so that does effect the results a little.

FIOS Connection:
Before: http://www.webpagetest.org/result/100623_CYH/
After: http://www.webpagetest.org/result/100623_DVW/

DSL Connection:
Before: http://www.webpagetest.org/result/100623_CYF/
After: http://www.webpagetest.org/result/100623_DVV/

In general, preloading images with JavaScript seemed to reduce the load time of the webpage.

Code:
<script type="text/javascript">
var preloadImage1=new Image(800,269);
preloadImage1.src="http://images9.green-watch.org/img/buttons2.png";
</script>

The above code demonstrates how to preload an image with JavaScript.

Sincerely,
Travis Walters
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Preloading JavaScript Images - sajal - 06-24-2010, 12:53 AM
RE: Preloading JavaScript Images - green-watch.org - 06-24-2010 05:12 AM
RE: Preloading JavaScript Images - pmeenan - 06-25-2010, 03:25 AM
RE: Preloading JavaScript Images - pmeenan - 06-25-2010, 04:32 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)