async and defer tags

3 Dec

good summary

http://www.w3.org/TR/html5/semantics.html
“””
The async and defer attributes are boolean attributes that indicate
how the script should be executed.

There are three possible modes that can be selected using these
attributes. If the async attribute is present, then the script will be
executed asynchronously, as soon as it is available. If the async
attribute is not present but the defer attribute is present, then the
script is executed when the page has finished parsing. If neither
attribute is present, then the script is fetched and executed
immediately, before the user agent continues parsing the page. The
exact processing details for these attributes is described below.

The defer attribute may be specified even if the async attribute is
specified, to cause legacy Web browsers that only support defer (and
not async) to fall back to the defer behavior instead of the
synchronous blocking behavior that is the default.

If the defer attribute may be specified, the src attribute must also
be specified.
“””

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: