champ — 2012-11-18T01:01:43-05:00 — #1
Is it bad to include all plugins in the script file the way I'm doing? I don't know the innards of how jQuery works, but do these plugins all have to somehow "register" with jQuery, which can cause a user's browser to bog down while it does this?
Is it better to just load the plugins as individual, external files on demand using something such as Modernizr.load()?
Most of the plugins I'm using are pretty lightweight, but a few are quite bulky (FlexSlider).
ralphm — 2012-11-18T21:06:41-05:00 — #2
I don't see a problem with this, and it's usually recommended to have fewer rather than more script links. I've not seen jQuery have any issue with plugin scripts included with other scripts. Would be interested to know what experts have to say, though.
paul_wilkins — 2012-11-19T03:47:41-05:00 — #3
For development it's great to have the scripts as separate links.
When taking things to production, it's best if all of the scripts are combined in to just the one script file.