W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2010

[whatwg] should async scripts block the document's load event?

From: Jonas Sicking <jonas@sicking.cc>
Date: Sat, 13 Feb 2010 16:22:29 -0800
Message-ID: <63df84f1002131622g4395e7f9haf05e006908d23e@mail.gmail.com>
On Sat, Feb 13, 2010 at 12:52 PM, Brian Kuhn <bnkuhn at gmail.com> wrote:
> FWIW, loading scripts asynchronously with the "Script DOM Element" approach
> does not block window.onload in IE. ?In Chrome and Safari, the downloading
> blocks, but execution doesn't. ?In Firefox and Opera, downloading and
> execution blocks.
>
> So, it's pretty hard to say what web developers would expect with async
> scripts. ?I know that they will like having things like ads and analytics
> not block window.onload though. ?At the very least, we need that ability to
> make that happen.

Yeah, my big concern is "what do developers expect". Having an
explicit attribute for not blocking onload definitely follows the path
of least surprise. Though having an explicit attribute does give Steve
more things to evangelize, i.e. it'll probably lead to more pages
firing onload later than they could.

/ Jonas
Received on Saturday, 13 February 2010 16:22:29 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:21 UTC