W3C home > Mailing lists > Public > public-html@w3.org > July 2009

Re: Reasoning behind the async attribute

From: Ian Hickson <ian@hixie.ch>
Date: Mon, 27 Jul 2009 22:24:22 +0000 (UTC)
To: Henri Sivonen <hsivonen@iki.fi>
Cc: "public-html@w3.org WG" <public-html@w3.org>
Message-ID: <Pine.LNX.4.62.0907272221070.23663@hixie.dreamhostps.com>
On Fri, 10 Jul 2009, Henri Sivonen wrote:
>
> It seems to me that async is a new thing and isn't describing existing 
> behavior. Correct?

Yes.


> I searched the obvious places and couldn't find a discussion leading to 
> its addition. Why was it added and does it have implementor interest?

The use case is including scripts with the following properties:

 * They load as quickly as possible
 * They don't slow down the loading of anything else
 * They are in the markup

For example, analytics scripts need to load as quickly as possible (the 
longer they are delayed, the more information they miss), but they must 
not delay the rest of the page (since that would affect the user 
experience and could in fact result in the metrics changing). "defer" was 
originally intended for this use case, but since its behaviour was never 
well-defined, it ended up being implemented in a way that doesn't address 
these needs.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 27 July 2009 22:25:07 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:48 UTC