---
title: "Discussion on \"Difference between ‘async’ and ‘defer’ attributes in JavaScript\" | Hashnode"
description: "Discussion on \"Difference between ‘async’ and ‘defer’ attributes in JavaScript\". Here we will see the difference between ‘async’ vs ‘defer’ attributes in JavaScript and also learn about how and when to use them.\n‘async’ and ‘defer’ are boolean attributes which we use along with script tags to load external JavaScript libraries ef..."
url: "https://hashnode.com/posts/difference-between-async-and-defer-attributes-in-javascript/604e1fbacd951c0ca4c01b9d"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Difference between ‘async’ and ‘defer’ attributes in JavaScript](https://kpnigalye.hashnode.dev/difference-between-async-and-defer-attributes-in-javascript?utm_source=hashnode&utm_medium=feed)

Here we will see the difference between ‘async’ vs ‘defer’ attributes in JavaScript and also learn about how and when to use them. ‘async’ and ‘defer’ are boolean attributes which we use along with script tags to load external JavaScript libraries ef...

Mar 14, 2021 · 5 min read · kpnigalye.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#js](https://hashnode.com/tag/js)
-   [#async](https://hashnode.com/tag/async)
-   [#developer](https://hashnode.com/tag/developer)
-   [#web-development](https://hashnode.com/tag/web-development)

## Written by

[Krishna Nigalye](https://hashnode.com/@kpnigalye)

@kpnigalye

  
[View profile](https://hashnode.com/@kpnigalye)

Consultant | .NET | JS | Full Stack | MS in Computer Engineering, USA

## Responses 1

Markdown supported · ⌘↵ to post

[NIKHIL CM](https://hashnode.com/@softman)

[Mar 15, 2021](https://hashnode.com/posts/difference-between-async-and-defer-attributes-in-javascript/604e1fbacd951c0ca4c01b9d/comment/604efa74cd951c0ca4c027ee)

Thanks for the nice explanation!
