4 ms·
First off, you shouldn't be down-voted for your opinion. If you agree or the comment adds to a discussion, up-vote. If you disagree, do nothing. If the comment
by Pewpewarrows 16y ago
First off, you shouldn't be down-voted for your opinion. If you agree or the comment adds to a discussion, up-vote. If you disagree, do nothing. If the comment is off-topic, asinine, or detracts from the discussion, only then down-vote. Come on HN, you should know better.
There's a lot of reasons to load Javascript from Javascript. One of the main ones that crop up is when you're building large single-page web applications that involve a lot of files that may or may not be dependent on one another. This allows you to start executing some of your page-specific Javascript as soon as the libraries it depends on become available, before the rest of your bulky resources finish loading.