Wednesday, January 9, 2013

script aync


The async support as specified by google is achieved using two parts:
  • using script on your page (the script is supplied by google) to write out a <script> tag to the DOM.
  • that script has async="true" attribute to signal to compatible browsers that it can continue rendering the page.
The first part works on browsers without support for <script async.. tags, allowing them to load async with a "hack" (although a pretty solid one), and also allows rendering the page without waiting for ga.js to be retrieved.

No comments: