: Jquery ui minify I have a series of web pages that link to the following: jquery-ui-1.8.4.custom.min.js jquery.ui.widget.js jquery.ui.core.js jquery.ui.accordion.js jquery.ui.selectmenu.js jquery.ui.button.js
I have a series of web pages that link to the following:
jquery-ui-1.8.4.custom.min.js
jquery.ui.widget.js
jquery.ui.core.js
jquery.ui.accordion.js
jquery.ui.selectmenu.js
jquery.ui.button.js
Not every page uses each .js (for example, not every pages uses jquery.ui.button) however I was wondering if it would make more sense to combine all of these files and minify them into a single.js file and include it on every page?
More posts by @Cooney921
5 Comments
Sorted by latest first Latest Oldest Best
You can also link to the jQuery files on cdnjs.com/ which is a free CDN hosting the most common jQuery and plugin js files.
I like the Google Closure Compiler ( code.google.com/closure/compiler/ ) for combining and minifying javascript files.
I don't use any advanced features.
One thing to consider is that total download size is not the only factor that will determine how long it takes to load a page. Each additional, external .js file is a separate server request for download, so load times will be impacted beyond the simple size of the file.
Google Page Speed has an excellent segment on how combining (or not) external files can impact page load time, using the concept of 'Round Trip Time.' Even beyond round trip, some older browsers do not allow parallel file downloading, and will block additional content from loading until all scripts are downloaded and executed.
Hope this helps!
Yes, you should combine the files.
Just use the custom download builder to select the parts you need, and it'll do it for you.
You should combine and minify these.
As per your comment to your question, there are tools that can help with this but essentially yeah, putting them all into one file and running a minifier will do the job.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.