I'm developing a dynamic website using jQuery and I have found several jQuery plugins to be very helpful when doing that.
Of course, for each plugin I add, there is another script to load when the page loads. I know that for pages to be quick to load, smaller and/or fewer resources is better.
Is it safe to just merge all those jQuery plugin files into one? Do I need to check something before I do, or can this even be done quick and dirty by a script on the server-side?
Yes it is safe to merge them into one.
And in most cases the page should load faster as a result, but there are some situations where doing so might slow things down. For example:
Yes, it is. That's what will happen in your browser, anyway.
You could also use a minification tool such as the Google Closure Compiler or the YUI Compressor to further reduce the size of your JavaScript code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With