Mobile app version of vmapp.org
Login or Join
Cooney921

: 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

@Cooney921

Posted in: #Javascript #Jquery

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?

10.05% popularity Vote Up Vote Down


Login to follow query

More posts by @Cooney921

5 Comments

Sorted by latest first Latest Oldest Best

 

@Angela700

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.

10% popularity Vote Up Vote Down


 

@Jamie184

I like the Google Closure Compiler ( code.google.com/closure/compiler/ ) for combining and minifying javascript files.

I don't use any advanced features.

10% popularity Vote Up Vote Down


 

@Phylliss660

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!

10% popularity Vote Up Vote Down


 

@Kristi941

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.

10% popularity Vote Up Vote Down


 

@YK1175434

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme