Ajax Bestiary: A Javascript Field Guide
 
Ajax Bestiary: A Javascript Field Guide
 
 

FastInit: SuperCharge Your Pageloads

Posted by Don Albrecht

What is it:

FastInit is a small JS file to create a Faster window.onload. It implements a powerful onload function queue that fires once teh dom is ready and before all images have been downloaded. Ideally, this results in a dramatic decrease in a pages initialization time.

How it Works

You any functions to the queue by using the FastInit.addOnLoad( function 1, function 2, …); function. All functions are fired in the order in which they were added to the queue. addOnLoad can be called as many times as is necessary. It fails gracefully to standard handlers if the browser doesn’t support the faster methods.

Requirements

As of version 1.4.1 the need for Prototype has been removed freeing the code for use in any project where a speedy onload method is needed.

Check it out here:

http://tetlaw.id.au/view/javascript/fastinit


Leave a Reply