ebsolutions — 2014-01-03T09:24:05-05:00 — #1
pullo — 2014-01-03T10:33:30-05:00 — #2
I use grunt for this.
Here's an excellent tutorial on how to install it and use it to concatenate JS files.
Of course, you could do this manually if you use a lot of libraries that aren't likely to change.
picnictutorials — 2014-01-03T12:39:11-05:00 — #3
I just put them all in one big file at the bottom of my page. Simple
francky — 2014-01-03T13:02:08-05:00 — #4
Yes, not in the <head>: Put Scripts at Bottom (and more "Best Practices for Speeding Up Your Web Site" over there).
- Maybe (1) there are some exceptions, but 99% of the js-files are functioning when put at the bottom; you've to test that before collapsing them into 1 big file. And keep a backup of the separate files: in case of an update of one of them, to make a new big one.
- Maybe (2) some of the js-files come from a content delivery network (CDN), which can be faster downloading than if you put them in the big file on your own server. Again some trials and comparing the test-pages will give the best way, I think.
picnictutorials — 2014-01-03T13:23:59-05:00 — #5
With my site in my sig I put most of the head section in a include and the same with the bottom. Extremely easy to manage. Because yes sometimes you have a js file that needs to go up top. In which case adding it is so simple.