O'Reilly logo

Async JavaScript by Trevor Burnham

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

What We’ve Learned

You can make your site much snappier by asynchronously loading the scripts you don’t need right away. The easiest way to do that is with judicious use of the defer and async attributes. If you need to load scripts conditionally, consider a loader like yepnope. And if your site has scores of interdependent scripts, take a good look at Require.js. Choose the right tool for the job, embrace it, and enjoy.

And on that note, we’ve reached the end of the book. Thanks for taking the time to read it. It was my pleasure to write it. No matter where your JavaScript journey takes you from here, I hope that it’s rich in beautiful, event-driven code.

Footnotes

[54]

The term was coined by the authors of the excellent JavaScript Performance ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required