Tag steve souders

Detailed look at Async JS Loading.

Steve Souders has posted about a talk he gave at the an SF JS Meetup concentrating on asynchronous loading mechanisms for javascript, the async script attribute, loading order and impact on the onload event.

Details are at JavaScript Performance and the slides are on slideshare

Adding <script> asynchronously

Steve Souders comes up with what should be the definitive way to add script into a web page. This is particularly relevant to widget and third party code developers.

Part of the acceptance criteria for third party code in an e-commerce environment is its lack of impact on performance and other code in the page

The article appendChild vs insertBefore I hope will be part of a set of best practice conclusions from his P3PC series.

To augment your reading of this article it is also worth reviewing the information on browser “busy” indicators that was contained in the lesson Load Scripts Without Blocking from his CS193H Stanford class.

Based on the above, I tend to use XHR injection for local scripts to avoid the Firefox busy indicator and script DOM element insertion for offsite 3rd party code.

Copyright © Martin Logan
web interested

Built on Notes Blog Core
Powered by WordPress