What Is The Fastest Way To Load JavaScript

  Рет қаралды 186,245

Web Dev Simplified

Web Dev Simplified

Күн бұрын

Пікірлер: 268
@kurtobando
@kurtobando 4 жыл бұрын
No long intro, short presentation, straight examples, clear explaination. Thank you Kyle.
@jackofnotrades15
@jackofnotrades15 4 жыл бұрын
Simple, elegant, crisp. Thats how you teach. Thats how it needs to be done ideally.
@busyrand
@busyrand 2 жыл бұрын
This is becoming one of my favorite KZbin channels period... This is perfect for beginner to intermediate developers.
@MartiQwx
@MartiQwx 2 жыл бұрын
The breaks he makes between each sentences make it so much easier for non-native speaker to understand.
@nekoill
@nekoill 4 жыл бұрын
I don't know how, but you manage to explain things like I'm five without being patronising. That's remarkable.
@Vikas_Singh_Kushwaha
@Vikas_Singh_Kushwaha 3 жыл бұрын
These small videos are really good. Because you can find full blown project tutorials on KZbin but these conceptual things are not available that often
@MrBoiks
@MrBoiks 3 жыл бұрын
This video helped me make sure my loading animations rendered crisply on page load. Before, even with gsap, everything appeared choppy and glitchy. One simple keyword and it animated as planned. Your my hero! I was going to scrap the entire loading animation
@darrenhale4028
@darrenhale4028 5 жыл бұрын
Exam is in 6 hours and you are an absolute life saver! Subbed!
@WebDevSimplified
@WebDevSimplified 5 жыл бұрын
I'm glad I could help. Good luck on the test.
@NYC_CuriousG
@NYC_CuriousG 5 жыл бұрын
Wow you're a good teacher. I get it now. Subscribed!
@WebDevSimplified
@WebDevSimplified 5 жыл бұрын
Thanks!
@davidpuckree5254
@davidpuckree5254 4 жыл бұрын
@@WebDevSimplified lol
@tubi8992
@tubi8992 2 жыл бұрын
Thanks!
@WebDevSimplified
@WebDevSimplified 2 жыл бұрын
Thank you for the support!
@tubi8992
@tubi8992 2 жыл бұрын
@@WebDevSimplified you deserve it Kyle, your videos are well researched, straight to the point and very useful. Wanted to say that in the comment but was watching it in bed before I fell asleep 🙃 keep up the great work!
@12thevil
@12thevil 2 жыл бұрын
Yo, you are really helping me get through school. I can't thank you enough.
@achtube85
@achtube85 3 жыл бұрын
3:41 This image is gold. So clear!
@gokujr4133
@gokujr4133 3 жыл бұрын
Bro what happened if we you javascript at the end of the code ? Instead of using defer and async.
@codedynamics1
@codedynamics1 Жыл бұрын
i swear you meant "significant" this is one of the best explainations i have found, very nice!
@terry9873
@terry9873 3 жыл бұрын
You don't know this yet but your my new mentor. Arigato senpai!
@Zabsounds
@Zabsounds 5 жыл бұрын
Everything is crystal clear and well explained!! Thank you ! Please don`t stop making this videos!
@av03
@av03 5 жыл бұрын
I never know about this until i watch this, as always your content is very helpful. Thanks Kyle
@avimehenwal
@avimehenwal 4 жыл бұрын
Amazing video ... So clear and crisp and with a DEMO ! Could not have asked for better XD Great job, keep it up. Big FAT link from my side
@thomasm1964
@thomasm1964 2 жыл бұрын
Kyle - you have an absolute gift for making clear, concise, straightforward explanations. Shall be binge-watching. Oh yes: and you have a clear, neutral voice as well. Cannot tell you how many times I have bailed due to affected, whiny voices!
@benjaminmoseslieb9856
@benjaminmoseslieb9856 2 жыл бұрын
Great teaching chops! It really comes through that you want to and have invested in becoming a great teacher. A much rarer skill than programming ;)
@crespinnougbodohoue7324
@crespinnougbodohoue7324 2 жыл бұрын
I have just discovered your channel and I am really impressed abt your simple, elegant and succint way to teach. Thanks a lot and Do not stop!!!!!
@ill-fatedstranger447
@ill-fatedstranger447 6 жыл бұрын
That's what i'm searching for and learn a lot of things.
@WebDevSimplified
@WebDevSimplified 6 жыл бұрын
Im glad the video could help.
@shinichi9do
@shinichi9do 5 жыл бұрын
perfect video, 0 dislike. good content.
@brucoffee1437
@brucoffee1437 2 жыл бұрын
If mdn docs ever wants to make video content I am suggesting this guy
@AlexTechie
@AlexTechie 6 жыл бұрын
Thanks, I've been meaning to look into this.
@WebDevSimplified
@WebDevSimplified 6 жыл бұрын
You are welcome!
@longmarcin
@longmarcin 4 жыл бұрын
Just one little detail. Async and defer are not tags! They're attributes of a script tag. Great video anyway. Keep up the good work :-)
@jaydenmoon1165
@jaydenmoon1165 3 жыл бұрын
Always love your content - clean and concise as always
@kuoyulu6714
@kuoyulu6714 Жыл бұрын
Thanks for this short clear tips, really help beginner like me to learn more!
@bsewall
@bsewall Жыл бұрын
Amazingly clear and concise. Thanks for the great video!
@brandonchen3180
@brandonchen3180 2 жыл бұрын
This guy is a god of web dev
@VanReactions
@VanReactions 2 жыл бұрын
The best video explanation for async and defer, this is very useful for seo, it will be great if you have a video speed optimization for SEO
@Tomakemehealthy2
@Tomakemehealthy2 5 жыл бұрын
Why defer is not the standard for html loading?
@soniablanche5672
@soniablanche5672 4 жыл бұрын
you don't need to use defer anymore anyway. Use module js, they defer by default.
@yadneshkhode3091
@yadneshkhode3091 4 жыл бұрын
@@soniablanche5672 can you please elaborate I didn't understand what you meant by module js
@soniablanche5672
@soniablanche5672 4 жыл бұрын
@@yadneshkhode3091 modules let you use "import {something} from "./some/javascript/file.js" in javascript, it's very useful because now dependencies can be declared inside javascript files instead of html files, they are also self contained code and don't pollute the global environment so you don't need to use an IIFE to isolate your code. In the html code you import a module like this : . They defer by default so you don't need to add "defer" to the script tag
@chemedev
@chemedev 4 жыл бұрын
@@soniablanche5672 Wou never heard of it in this time! But I'm web developing for 7 months now so it's no surprise haha. I'll be learning about that, thanks for that piece of knowledge!
@bboydarknesz
@bboydarknesz 4 жыл бұрын
@@chemedev here from Web Dev explain JS Modules kzbin.info/www/bejne/mYOrgoGEmL6ZbNU
@ramiahviknesh3014
@ramiahviknesh3014 3 жыл бұрын
Simple and was visually easy to grasp the concept !
@vibonacci
@vibonacci 5 жыл бұрын
Good video. But one topic was not discussed: you can use both async and defer on the same tag, like Google Maps is loaded.
@Novia5555
@Novia5555 2 жыл бұрын
Can I get some videos or references according to that? I'm a bit curious and after trying to look for it, I didn't find something like you said.
@minou00701
@minou00701 4 жыл бұрын
your content is so clearly ordered and straight to the point .. so the viewer knows the roadmap and then everything is concretized with different examples that are small easy to follow and to the point as well .. one of the best teachers bro .. hats off and big thanx .
@heitormbonfim
@heitormbonfim 2 жыл бұрын
Bruh, I love your channel, thanks
@rizean2
@rizean2 2 жыл бұрын
Backend dev who has to do some front-end from time to time. I wrote a function called setPolling to make sure some elements existed before running. Embarrassing to say I didn't know about putting the scripts at the bottom of the page. I need to go add the defer tag and remove the setPolling code on production pages serving 10s of thousand users per day. I use to make fun of front-end devs but after doing it a while I can say in many ways it harder that what most backend devs have to deal with.
@pastorfred2543
@pastorfred2543 5 жыл бұрын
Thanks sir, I've learnt something new today..
@WebDevSimplified
@WebDevSimplified 5 жыл бұрын
I'm glad I could help!
@gopinathkrm58
@gopinathkrm58 6 жыл бұрын
Very nice video please upload 3 or 4 videos per week if possible...my next suggested topic is JavaScript Constructor in depth.
@WebDevSimplified
@WebDevSimplified 6 жыл бұрын
I'm glad you enjoyed the video. I would produce more videos each week, but it is tough enough for me to manage a full time job and two videos a week. I am always trying to improve my workflow, though, to create videos faster and hopefully more often. As for your suggestion on the JavaScript constructor, what exactly would you like me to cover about it?
@gopinathkrm58
@gopinathkrm58 6 жыл бұрын
@@WebDevSimplified like difference between other methods and constructor function to create an object and some advanced concepts
@WebDevSimplified
@WebDevSimplified 6 жыл бұрын
@@gopinathkrm58 That sounds like a good idea. I added it to my list of video ideas. Thanks!
@Antipyj
@Antipyj 5 жыл бұрын
All your videos are so clear ty
@meaningmean
@meaningmean 5 жыл бұрын
Thanks, Sir, I've learned something new today.
@AnilKumar-ro6dz
@AnilKumar-ro6dz 5 жыл бұрын
I like your simple way of explanation, keep doing more videos.... 👍
@PraveenClasses
@PraveenClasses 3 жыл бұрын
amazing explanation...and greate visualisation... very greate work. thank you... 100 likes from my side
@arcanelore168
@arcanelore168 10 ай бұрын
Thank you very much for your video. I didn't know this!
@andrew.schaeffer4032
@andrew.schaeffer4032 Жыл бұрын
wonderful video thanks - concise and great visuals
@johnconnor9787
@johnconnor9787 3 жыл бұрын
The video about Tree Shaking would be awesome
@anneu8314
@anneu8314 5 жыл бұрын
Thanks again.. I'm learning a lot from your videos.
@martinhotmann7868
@martinhotmann7868 3 жыл бұрын
I am missing some notices about inlineJS. As inlineJS often makes sense if you have less then 1kb. But defer does not work on script-tags in general but just on them if they have a "src" attribute. So if you want to defer inlineJS you can execute it on the event of "DOMcontentLoaded" or put it before the end of the closing body-tag. Its a pitty "defer" does not work on inlineJS. Thank you for your tutorial!
@madhubalajayakumaran9340
@madhubalajayakumaran9340 5 жыл бұрын
Best examples... best comparison 👍👍
@WebDevSimplified
@WebDevSimplified 5 жыл бұрын
Thank you
@송예은-h7b
@송예은-h7b 2 жыл бұрын
This was a very helpful video! Thanks
@usmanabid7950
@usmanabid7950 2 жыл бұрын
Well Explained, Thanks Bud 👍👍
@davidfelipecastanocadavid5430
@davidfelipecastanocadavid5430 3 жыл бұрын
Great Explanation, thanks for the help !!
@Ad1tyapardeshi
@Ad1tyapardeshi 4 жыл бұрын
Want more videos like this & Thanks 🙏
@Champagnerushi
@Champagnerushi 4 жыл бұрын
Really good explanation man!
@muvvaanudeepreddy1562
@muvvaanudeepreddy1562 3 жыл бұрын
thank u for ur crystal clear Explanation.
@bhargavaram4377
@bhargavaram4377 4 жыл бұрын
your explanation is really excellent
@mosomara
@mosomara 3 жыл бұрын
HI ... thanks for this great video ... i am wondering what is in the "i.js" script ... how do you time the Start and End of HTML parse?
@RodrigoMendoza7
@RodrigoMendoza7 5 жыл бұрын
Is it correct to assume that by putting our js file in the head and using defer, we can then omit the event "DOMContentLoaded" or document.ready from jQuery (as we've been doing so far)?
@WebDevSimplified
@WebDevSimplified 5 жыл бұрын
That is correct. Defer waits until the entire page is loaded to run so the document should already be ready.
@RodrigoMendoza7
@RodrigoMendoza7 5 жыл бұрын
@@WebDevSimplified Thanks for clarifying that out 😃👌
@venkyman4985
@venkyman4985 3 жыл бұрын
I kno this irrelavant, but there is there a double quote missing at 1:30 in the script tag?
@nathanheath1328
@nathanheath1328 4 жыл бұрын
This is amazing, thank you for this tutorial !
@gamersgame43
@gamersgame43 4 ай бұрын
9:15 good tip for loading JS files!
@baabansu9243
@baabansu9243 4 жыл бұрын
You are always special sir. You are unique
@corethenics
@corethenics 5 жыл бұрын
Good explanation but need to provide the sample code to the viewers so that they can play with it for better understanding. You can upload the same on gitHub and add the link in description.
@WebDevSimplified
@WebDevSimplified 5 жыл бұрын
Sorry. This is one of my older videos. In my newer videos I have links to both a github and codepen for all applicable videos. I don't generally add code for a video like this though since it is mostly about explanation and the actual code does not have an endpoint or use.
@ritu_raj_s
@ritu_raj_s 3 жыл бұрын
Best explanation 👌👌👌
@koushi_ku
@koushi_ku 4 жыл бұрын
thank's man... nice visualization got from the video
@aravind.a
@aravind.a 4 жыл бұрын
Wow amazing explanation...❤️🔥
@RobertWildling
@RobertWildling 5 жыл бұрын
Which script did you use to show the various loading times and steps in the console? Can it be downloaded anywhere? Thank you so much for your great informative no-BS videos!
@WebDevSimplified
@WebDevSimplified 5 жыл бұрын
I do not have the script available for download. If I remember correctly I just used a very large script tag to simulate the loading and added a little bit of JS to print to the console when loaded.
@BrianKiddDevDesign
@BrianKiddDevDesign 3 жыл бұрын
@RobertWildling You can use console.time() and console.timeEnd() to figure out when certain parts of the program load. For instance, in my JavaScript file, I placed console.time("JavaScript Loaded") at the beginning of the JS file and console.timeEnd("JavaScript Loaded"); at the end of my JS file. The result will show in the console as something like: JavaScript Loaded: 0.130859375 ms You can do the same for your HTML file by placing both console.time("html start); console.timeEnd("html start"); at the START of your HTML file and console.time("html end"); console.timeEnd("html end"); at the END of your HTML file. The total end result if you used defer could be: html start: 0.003173828125 ms html end: 0.001953125 ms JavaScript Loaded: 0.130859375 ms When I did not use async or defer AND the link to my js file was before the HTML (not at the end of the body section), the result was: html start: 0.0029296875 ms JavaScript Loaded: 0.05078125 ms html end: 0.001953125 ms I am unsure if this is how the presenter did it but it seems to work. I think the presenter had a separate JS file in which he targeted different parts of the DOM like the html and script tags and then just ran a console.time() and console.timeEnd() to determine the different load times of those targets. I hope this helps.
@maldonadodani
@maldonadodani Жыл бұрын
thanks man, great explanation
@aryantirkey1744
@aryantirkey1744 4 жыл бұрын
Always something new to learn thank u
@Sd-ge2rk
@Sd-ge2rk 3 жыл бұрын
That's really useful! Many thanks for the video. Could you share more about the javascript that you have on the right showing when the html starts and ends etc.?
@AleksandarIvanov69
@AleksandarIvanov69 4 жыл бұрын
Damn, thankfully you mellowed out the crazy eyes in 2020 :D
@fallonmerri9586
@fallonmerri9586 3 жыл бұрын
Thank you for the graph!!
@tilakmadichettitheappdeveloper
@tilakmadichettitheappdeveloper 4 жыл бұрын
this explains a lot mate !
@bboydarknesz
@bboydarknesz 4 жыл бұрын
thanks, amazing, simple and very understanding
@devanshnigam5172
@devanshnigam5172 Жыл бұрын
Brilliant video and amazing content. Just one doubt, how to clock and record the time of execution of a statement in the document (HTML) or script (JS).
@md.imanali9998
@md.imanali9998 2 жыл бұрын
Absolutely amazing. Thank you
@shinej11
@shinej11 4 жыл бұрын
Beautiful explanation. Thank you :)
@mackynyxz
@mackynyxz 3 жыл бұрын
Nice explanation!
@P4P1_
@P4P1_ 4 жыл бұрын
Thank you very much. Today I learned something
@onee
@onee 3 жыл бұрын
It's funny how on StackOverflow they were hating on defer and praising async.
@elpislivenetwork
@elpislivenetwork 9 ай бұрын
Very helpful, thank you so much. God bless!
@josephmarlon2684
@josephmarlon2684 23 күн бұрын
clear explanation of terms
@MontyKsycki
@MontyKsycki 5 жыл бұрын
Thank You!!! Did not know that. Thanks for sharing!! :)
@denonbasf3117
@denonbasf3117 3 жыл бұрын
Amigo you're best.
@beverlyHillsAgent
@beverlyHillsAgent 3 жыл бұрын
So with "async" can be executed at anytime after the script is downloaded. There is no guarantee when it will be executed. It can be before the HTML is done parsing or after the HTML is done parsing. However, with "defer" is always executed after the HTML is done parsing. Correct me if I am wrong.
@vincentiusherie
@vincentiusherie 3 жыл бұрын
This is brilliant! I've been wanting to know how HTML and JS are parsed.
@noahkim6463
@noahkim6463 3 жыл бұрын
So helpful. Thank you :)
@ernestomotta5178
@ernestomotta5178 4 жыл бұрын
Thank you, you made it very clear
@Tony.Nguyen137
@Tony.Nguyen137 10 ай бұрын
So if the deferred Js is executed after the html is parsed, does it mean that it comes before the rendering process???
@yahayaoyinkansola8258
@yahayaoyinkansola8258 4 ай бұрын
Yes, before the DOM is rendered, the script is executed, but the only difference here is that the HTML structure is already in place, so after the script executes, it doesn't take time for the content of the DOM to show in the browser
@andriiauziak1178
@andriiauziak1178 5 жыл бұрын
That's a useful information I didn't know
@sohammondal578
@sohammondal578 5 жыл бұрын
That animation was so good.
@WebDevSimplified
@WebDevSimplified 5 жыл бұрын
Thanks!
@miw879
@miw879 3 жыл бұрын
I wish I got to know your channel 3 years ago
@rennygalindez
@rennygalindez 4 жыл бұрын
Excelente vídeo, gracias!
@Arthur-cx1cg
@Arthur-cx1cg 4 жыл бұрын
very good explanation! thanx!
@0the0ambient0
@0the0ambient0 4 жыл бұрын
Nice explanation. Thank you.
@JOc17KER
@JOc17KER 3 жыл бұрын
3 hero in programing: 1. The Newboston 2. Traversy Media 3. Web Dev Simplified
@pauloffborba
@pauloffborba 4 жыл бұрын
Excellent explanation
@عبدالله0-ج3ط
@عبدالله0-ج3ط 4 жыл бұрын
thanks for the explanation on this subject
@BruceElgort
@BruceElgort 4 жыл бұрын
Great video! Thank you.
@henrychoi3327
@henrychoi3327 4 жыл бұрын
3:30 an informative chart
@naveenkr5992
@naveenkr5992 4 жыл бұрын
So defer works like if I put js at the bottom of body am I right?
Differences Between Var, Let, and Const
8:37
Web Dev Simplified
Рет қаралды 196 М.
Learn JavaScript DOM Traversal In 15 Minutes
14:44
Web Dev Simplified
Рет қаралды 230 М.
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 42 МЛН
Another 5 Must Know JavaScript Features That Almost Nobody Knows
22:42
Web Dev Simplified
Рет қаралды 215 М.
The Async Await Episode I Promised
12:04
Fireship
Рет қаралды 1,1 МЛН
Reference Vs Value In JavaScript
15:12
Web Dev Simplified
Рет қаралды 186 М.
async vs defer attributes in Javascript | Ola Interview Question
8:10
JavaScript Visualized - Event Loop, Web APIs, (Micro)task Queue
12:35
Learn CSS Flexbox in 20 Minutes (Course)
20:37
Coding2GO
Рет қаралды 323 М.
Learn JavaScript Event Listeners In 18 Minutes
18:03
Web Dev Simplified
Рет қаралды 606 М.
100+ Web Development Things you Should Know
13:18
Fireship
Рет қаралды 1,6 МЛН
JavaScript Pro Tips - Code This, NOT That
12:37
Fireship
Рет қаралды 2,5 МЛН
I built the same app 10 times // Which JS Framework is best?
21:58
Fireship
Рет қаралды 2,6 МЛН