[Bug 25470] [imports]: improve description of async to clarify execution order

https://www.w3.org/Bugs/Public/show_bug.cgi?id=25470

--- Comment #3 from Glenn Maynard <glenn@zewt.org> ---
I'm not saying it shouldn't support asynchronous loading, I'm asking whether it
should really support the <script async> model instead of the <script defer>
model.

<script async> means "load the resource asynchronously, and run the script as
soon as it's ready".  <script defer> means "load the resource asynchronously,
and run the script in the order it was added (at the end of parsing)".  If you
have multiple <script defer>s, they all load asynchronously, but later ones
don't execute until earlier ones, even if the network load happens to finish
first.

With the defer model, b.html, c.html, a.html and d.html would always be
executed in that exact order (sync before defer, then defer in the order
added), which is much easier to test--you don't have to test every possible
load order to be certain your page always works, since the load order is always
predictable.

It seems like <script async> was a bad idea which <script defer> fixed, and now
this is making the same mistake.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Monday, 28 April 2014 22:10:03 UTC