The Once And Future Script Loader



Schedule: , , ,

The Once And Future Script Loader

Like the tales of King Arthur, the history, mythology, and lore of script loaders is teeming with both fact and fiction. If we’re going to achieve the destiny of true web performance optimization in our page loads, we’re going to have to separate the myths from the truths.

We’re going to take a brief look at the history of script loading techniques, looking at what survived and what didn’t, and why. We’ll also look at some of the techniques that are still around but shouldn’t be!

Then we’re going to jump into a broad review of current script loading techniques. We’ll cover from the very basic single-script snippets (like the “async snippet” from Google Analytics), to general script loaders like LABjs and HeadJS (and several others). We’ll also look at task-specific script loaders such as those found in frameworks (Dojo, YUI, etc). Our goal will be to identify the characteristics of each loader and loading technique, to give you solid information you can use when choosing the right script loader for your sites.

We’ll also survey the current state of browser technology and the HTML specification standards for these loading techniques, and also talk briefly about where those things are headed in the future.

Next, we’ll gaze into the crystal ball to look at the future of advanced use-cases for script loading, such as module dependency (RequireJS) and deferred script execution (ControlJS). We’ll talk about why these things are so valuable, and give you practical do’s and don’ts for implementing these techniques right now.

Lastly, we’ll conclude with a quick discussion of how server-side technology can help improve the capability and performance of script loading in the browser.

The rich history, diverse current state, and bright future for script loaders is both technically challenging and highly rewarding in performance gains, if you accept the quest.