Both async and defer attributes look like they do the same thing at first glance, but there are nuances to async and defer. Most of the time, you’d want to use defer instead of async, even though async sounds sexier.
I’d like to walk you through the differences and why you should use them (and also why you don’t have to use them).
If you ask around the web, many people will say you don’t have to remember everything since you can always google. But this answer doesn’t help — you can’t always Google everything, every time. If you forget absolutely everything and Google everything all the time, you’re going to be real slow when you code!
So what’s the alternative? What must you remember? What can you forget? That’s what this article is for.
If you’re interested in hearing the lessons I learned from dedicating 4 years of my life to building one course, then this article is for you!