Is traditional JavaScript image pre-loading taboo

Posted by Evan Plaice on Pro Webmasters See other posts from Pro Webmasters or by Evan Plaice
Published on 2012-04-08T05:50:01Z Indexed on 2012/04/08 11:47 UTC
Read the original article Hit count: 476

Filed under:
|
|
|

I remember the good-old-days (not really) back when I was still sucking the teet of Dreamweaver to build websites and the lure of playing copypasta with fancy built-in scripts (ex, image-swap) was like black magic.

I'm pretty far removed from that now days but I was adapting a small site from it's original FrontPage (::cringe::) format to a standard HTML/CSS implementation and couldn't help wondering... should I should re-implement the JavaScript image pre-loading into the current version? Or, is there a better way?

I don't want to block the page from loading by requiring the user to request all the assets withing the page by using the traditional JavaScript pre-loader method. I value giving the user something to look at ASAP, and there's some potential harm to my Google mojo by doing so.

Is there a cleaner solution to prevent unnecessary page-reflows during loading? Such as, setting the static width/height dimensions through a CSS style attribute on the image element.

© Pro Webmasters or respective owner

Related posts about css

Related posts about JavaScript