---
title: "Discussion on \"When to use async and defer attributes in a script tag and why it is important\" | Hashnode"
description: "Discussion on \"When to use async and defer attributes in a script tag and why it is important\". Do you know the importance of defer and async attributes in the script tag?\nWhen we load any webpage in the browser, the browser generates a DOM(Document Object Model) by parsing the document.\nWhen there is no attribute(defer or async) to the script ..."
url: "https://hashnode.com/posts/when-to-use-async-and-defer-attributes-in-a-script-tag-and-why-it-is-important/5fec0b4eb2cf2458fe323b12"
---

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

Discussion

# [When to use async and defer attributes in a script tag and why it is important](https://blog.yogeshchavan.dev/when-to-use-async-and-defer-attributes-in-a-script-tag-and-why-it-is-important?utm_source=hashnode&utm_medium=feed)

Do you know the importance of defer and async attributes in the script tag? When we load any webpage in the browser, the browser generates a DOM(Document Object Model) by parsing the document. When there is no attribute(defer or async) to the script ...

Dec 30, 2020 · 2 min read · blog.yogeshchavan.dev  
Updated Apr 26, 2021  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#html](https://hashnode.com/tag/html)
-   [#codenewbies](https://hashnode.com/tag/codenewbies)

## Written by

[Yogesh Chavan](https://hashnode.com/@myogeshchavan97)

@myogeshchavan97 · India

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

Full Stack Developer | Freelancer | JavaScript | React | Nodejs. https://yogeshchavan.dev/. Book 1:1 @ hiretheauthor.com/myogeshchavan97

Full Stack Developer | Freelancer | JavaScript | React | Nodejs. Loves sharing knowledge through technical articles. Dev.to: https://dev.to/myogeshchavan97 https://linktr.ee/myogeshchavan97

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
