JavaScript Loading Strategies: Placing the Script Tag

preview_player
Показать описание
There are multiple design patterns and strategies for the loading of JavaScript files in a browser. In this tutorial we look at area, the placement of the script tag in the HTML file. We will look at the implications and discuss the HTML loading process.

For more resources on JavaScript:

Full personalized courses on JavaScript:
Courses offered on Udemy: Getting Started or Advanced Topics at a huge discount:
Рекомендации по теме
Комментарии
Автор

Thanks for this. I am learning java script and I was struck at this. Your video cleared my doubt.

binaykumar
Автор

Great tutorial. Also splitting before minifying if the bundle becomes too large (>500kb) to render only what's needed in the first initial page which gets loaded along with this first main bundle is definitely needed and also loading other scripts asynchronously when required for routes would be ideal in these scenarios!

sumantkanala
Автор

Once more - Thank you for your time and efforts to make and share those great tutorials.

One question, should you have time to help me - May I rely that DOMContentLoaded is equivalent to the jQuery's document.ready ? Lets say that at the end of 2019 all browsers are modern.

Thank you.

cecomecoev
Автор

Is there a use case for the defer attribute? I understand it executes the script after parsing but before the DOMContentLoaded event.

Dylan-fehn