Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8965915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:54:53+00:00 2026-06-15T16:54:53+00:00

My question is simply: what are the differences in performance between synchronous and asynchronous

  • 0

My question is simply: what are the differences in performance between synchronous and asynchronous JavaScript script loading?

From what I’ve gathered synchronous code blocks the loading of a page and/or rest of the code from executing. This happens at two levels.

First, at the level of the script actually loading, and secondly, within the JavaScript code itself.

For example, on the page:

Synchronous: <script src="demo_async.js" type="text/javascript"></script>

Asynchronous: <script async src="demo_async.js" type="text/javascript"></script>

Edit: Removed invalid code examples

So what really is the difference in performance from using these different loading methods and JavaScript patterns?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T16:54:54+00:00Added an answer on June 15, 2026 at 4:54 pm

    For your first question/snippet, its more about control-flow than performance. Performance is just an implicit consequence there.

    <script> tags will, traditionally, block the HTML Renderer if they are encountered. That means, if you load a huge javascript file with a blocking <script> tag at the very top of the markup, a user would not see any progress on the page as long as the script is getting loaded and evaluated.

    In contrary, if we flag the <script> tag with attributes like async and/or defer, the browser will no longer stop the HTML render process, but load and evaluate the script block asyncronously. How an implementation does this, is not on your concern (whether it uses real threads under the hood or just sequentially process it).


    Your second snippet is not really asyncronous code. Its just function expressions which invoke themselfs. That is still considered syncronous execution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

my question simply relates to the difference in performance between a socket in C
Just a simple question from a relative Java newbie: what is the difference between
This is a simple question from algorithms theory. The difference between them is that
Disregard this question: I've simply confused <script src=...></script> tag and <script> [some functions] </scipt>
Just a quick question. Is there any performance difference between using PDO::fetchAll() and PDO::fetch()
Pretty simple question: what's the performance difference between a Byte Stream and a Character
Here's a simple question : Is there any (performance) difference between this : Person
Are there significant performance differences (at runtime and/or compile time) between constructing and assigning
Simply put, what are the (or are there any) differences between doing say class
The question is simply between $(body).click(function(e){}); vs $(document).click(function(e){}); which is more efficient or advisable?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.