Submitted by: Srinath M S(srinath_ms@yahoo.com)

Friday May 4th 2018 by Srinath M S

Language: Web, Expertise: Intermediate - Learn how to easily load JavaScript asynchronously to improve page performance.

By default, JavaScript script files are loaded synchronously in the page execution and thus are bound to slow down the page.

You can asynchronously load the scripts by simply adding the "async" attribute on the script tag. The script will be executed asynchronously while the rest of the HTML page is being parsed.

For example:

<script src="longloadingscript.js" async></script>
Mobile Site | Full Site