3 ms·
I've been sleeping on best practices here... is it preferred to do a script with defer in the <head> over putting it at the bottom of the <body> now?
by tedmiston 10y ago
I've been sleeping on best practices here... is it preferred to do a script with defer in the <head> over putting it at the bottom of the <body> now?
- angry-hacker 10y agoDoesn't matter much with defer or async. If you but the at the bottom, they start loading in parallel slightly later.
- ec109685 10y agoWhich could be a good thing or bad thing depending on its importance to the experience.
- Sidnicious 10y agoI'd say yes. Defer-in-<head> works just like bottom-of-<body>, except the browser can start downloading and parsing the scripts right away (and in parallel if it wants).