I'm developing a website, but I realized that, in addition to the link to my main javascript file, and the link to the jquery file, it's beginning to look like I'm going to have links to three or more plugins also. I'm just wondering if this is good practice? The site I'm building is a web app, so I need a lot of functionality, but I don't want to be a plugin glutton. Is it considered good to append all the javascript plugins together into one file so as to only have to download one file, or will I run into problems?
If the plugins will be adding value to your site, I cannot see how that will be a problem. In general, plugins contain just enough code to do what they were meant to do. This makes their use quite a good practice when compared to using one monolithic library with plenty of unused functionality.
As for concatenating the JavaScript files together, that can help in terms of front-end loading performance, so I would recommend that.
Im working on the performance of a large corporate website that uses jQuery. We have found that a high number of connections can really kill performance.
There are three things you can do with your plugins
The minified js means it will download and parse faster, combined into one file will save some connections, and using a cookieless domain will reduce the data that has to be sent up to the server.
Using a CDN eg Google for the main jquery file is also a good idea.
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