Daffodil Computers Ltd.

Programming Language => Java Forum => Topic started by: bbasujon on February 09, 2012, 08:23:58 AM

Title: Compress JavaScripts with WP-Minify
Post by: bbasujon on February 09, 2012, 08:23:58 AM
For many webmasters, one big problem they face is having JavaScript and CSS files that occupy a larger space. Anyone using the WordPress would have come across this situation too,. where you can find jQuery scripts taking more than 50 KB of your space. However these scripts can be compressed (to a greater extent).
Compress Javascripts & CSS in WordPress

If you are using the WordPress platform, I suggest you got to Install WP-Minify, a plugin that is especially designed to compress the Javascripts in your website. Follow the below procedure to get started with compressing the Javascripts and CSS files.

ownload WP-Minify Plugin from here
Install WP-Minify Plugin and activate the same
This is a sample screenshot of the WP-Minify Plugin

(http://www.bytechip.com/wp-content/uploads/2010/01/wp-minify.jpg)

    WP Minify can compress both JavaScripts as well as CSS files.
    We can restrict WP-Minify from compressing the files by , specifying in the Exclude Textbox.
    External Scripts are better not to be cached with WP-Minify , so exclude them in the list, you can see the Alexa Badget , Infolinks and Technorati media excluded from the compression list.
    You would have noted “Up to 37565 bytes could have been saved through compression. ” in jquery file, ie, this particular file alone can be compressed to save around 35Kb.

Example:
Download Time after using WP-Minify
(http://www.bytechip.com/wp-content/uploads/2010/01/wp-minify-before.jpg)

(http://www.bytechip.com/wp-content/uploads/2010/01/wp-minfy-after.jpg)
(http://www.bytechip.com/wp-content/uploads/2010/01/size-wp-minify.jpg)
(http://www.bytechip.com/wp-content/uploads/2010/01/wp-minify-size.jpg)

http://wordpress.org/extend/plugins/wp-minify/