---
title: "Discussion on \"Sync vs Defer in JavaScript\" | Hashnode"
description: "Discussion on \"Sync vs Defer in JavaScript\". Sync and defer are two attributes that can be used to modify the behavior of script tags in HTML. They affect how and when the browser downloads and executes the JavaScript code.\nBy default, when the browser encounters a script tag, it stops parsing ..."
url: "https://hashnode.com/posts/sync-vs-defer-in-javascript/65ea01b216897ce38da18dac"
---

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

Discussion

# [Sync vs Defer in JavaScript](https://kalugab.hashnode.dev/sync-vs-defer-in-javascript?utm_source=hashnode&utm_medium=feed)

Sync and defer are two attributes that can be used to modify the behavior of script tags in HTML. They affect how and when the browser downloads and executes the JavaScript code. By default, when the browser encounters a script tag, it stops parsing ...

Mar 7, 2024 · 2 min read · kalugab.hashnode.dev  
Read the article

-   [#sync](https://hashnode.com/tag/sync)
-   [#defer](https://hashnode.com/tag/defer)
-   [#javascript](https://hashnode.com/tag/javascript)

## Written by

[Gabriel Kalu](https://hashnode.com/@Gabbykal)

@Gabbykal

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

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
