asp.net.ph

Skip Navigation Links

ASYNC Attribute | async Property

HTML Element Attributes


Specifies whether a script should be evaluated asynchronously.

Applies To: SCRIPT

Syntax


Inline <element async ... >
Script object.async = true | false

Possible Values


true | false ( implied )

The property is read/write with a default value of false.

Remarks

The async attribute is a boolean attribute, meaning its presence on an element represents true, and its absence represents false.

The behavior when async is present, depends on the script type.

For classic scripts, the script will be fetched in parallel to parsing and evaluated as soon as it is available ( potentially before parsing completes ).

For module scripts, the script and all its dependencies will be fetched in parallel to parsing, and the module script will be evaluated as soon as it is available ( potentially before parsing completes ).

async and defer both instruct the browser to download the script(s) in a separate thread, while the rest of the page ( the DOM, etc. ) is downloading, so the page loading is not blocked during the fetch process.

Example

<script src="/example.js" async></script>
Applies To

SCRIPT



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note