3 ms·
If you put a blocking script at the bottom you're still stuck waiting for CSSOM. If you put a script-injected tag at the bottom you're also blocked on CSSOM and
by igrigorik 12y ago
If you put a blocking script at the bottom you're still stuck waiting for CSSOM. If you put a script-injected tag at the bottom you're also blocked on CSSOM and your script is not discoverable by the preloader. For more details , see the comparison table in the post.
- Kiro 12y agoI'm not talking about a script injected tag, just a normal tag which doesn't block CSSOM. If you put them right before the closing body tag you address both the CSSOM issue and the DOM blocking since the DOM has already been processed. I understand that async also enables quicker execution of the script. What I don't understand however is why anyone would use script injection when you can just put the script tag at the bottom of the page to avoid DOM blocking. What am I missing?
- deleted 12y ago[deleted]