JavaScript Loading Strategies | Async vs Defer | Which is Faster?

Опубликовано: 06 Июнь 2022
на канале: ProgressiveCoder
387
14

JavaScript Loading Strategy is an important aspect to consider when building a web application. Choosing the wrong strategy can cause performance issues in your application and lead to a bad user experience.

Broadly, we have two main strategies - async and defer. They determine how a JavaScript file gets loaded by the browser when the web application is being rendered. Both async and defer are suitable for certain use-cases. While using the script in the HTML document, we should consider the usage of the script and accordingly use the appropriate strategy.

In this video, the difference between async and defer will be absolutely clear. At the end, you will be be in a position to make the correct choice for your application.

00:00 - Intro
02:10 - JavaScript Loading Problems
04:20 - Defer Strategy
06:01 - Async Strategy
07:41 - Async and Defer Together

#JavaScript #JavaScriptTutorial #WebDevelopment

++++++++++++++++++++++++++++++++++++++++++++++++
Visit the Home Base of CSTrekker: https://www.cstrekker.com
Visit my General Tech Blog for lots of how-to articles on various technologies: http://www.progressivecoder.com
Visit my Web Development Specific Tech Blog if you are interested only about web development: https://www.progressivewebninja.com
You can also check out my Github account for examples I have built: https://www.github.com/dashsaurabh

+++++++++++++++++++++++++++++++++++++++++++++++++