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

Limitations and Caveats

Before we continue, here are a few important things to note:

  • The techniques in this chapter are not compatible with scripts that are inlined (defined directly in your page’s markup). Inlining should be avoided when possible. If you must inline a script, don’t try to use the defer or async attribute on it.

  • When using any of the techniques in this chapter, you should not use document.write. Its behavior in asynchronously loaded scripts is unpredictable. If you don’t know what document.write is, then good. Suffice to say it’s the GOTO of DOM manipulation.

  • This is not a definitive guide. I’ve neglected some important platform-specific details for the sake of brevity. For example, certain mobile browsers will refuse ...

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