Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Emmanuel Simond

    (@emanwebdev)

    see Parser Blocking vs. Asynchronous JavaScript

    Adding the async keyword to the script tag tells the browser that it should not block the DOM construction while it waits for the script to become available – this is a huge performance win!

    gioni

    (@gioni)

    First of all, suggested attribute is a new HTML 5 attribute. What about non-HTML 5 sites? Secondly, what about order of loading? How you will control it? Imagine that some script, which depends on jQuery will loaded before jQuery script? Thirdly, what about inline JavaScript code that depends on jQuery or any external script?
    Why not move scripts to the footer?

    Maybe make this a configuration option so when using a service like Cloudflare we can add data-cfasync='true'
    Emmanuel Simond – thanks for the hack in the mean time;)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘IMPROVEMENT : ADD async for javascript’ is closed to new replies.