Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Script tags at the bottom of body has become the accepted standard for faster page loads. I'd think the library would have to be doing some strange things to not work if placed in the head, though.


> I'd think the library would have to be doing some strange things to not work if placed in the head, though.

Not really. All it does is `var body = document.body` in an IIFE. In <head>, that yields undefined.


Why not use document.DOMContentLoaded ?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: