12:41 pm - Thursday February 9, 2012

Compress JavaScripts with WP-Minify

  • Share
  • Share

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.

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

    wp minify Compress JavaScripts with WP Minify

    WP Minify Settings Page

  • 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

wp minify before Compress JavaScripts with WP Minify

Download time before using WP-Minify

wp minfy after Compress JavaScripts with WP Minify

Download time after using WP-Minify

Object Size after using Wp-Minify

size wp minify Compress JavaScripts with WP Minify

Size of Objects before using WP-Minify

wp minify size Compress JavaScripts with WP Minify

Size of Objects before using WP-Minify

Click here to download WP-Minify

pixel Compress JavaScripts with WP Minify

Loading
Filed in: Web

13 Responses to “Compress JavaScripts with WP-Minify”

  1. Everyday Techies
    January 29, 2010 at 8:36 pm #

    looks like this compression plugin can increase the site loading times a lot, will give it a try soon, thanks,
    .-= Everyday Techies´s latest blog ..How to Delete Internet History =-.

    • January 29, 2010 at 9:23 pm #

      Yes dude, Try it , you will find a huge difference in the loading time :)

  2. January 29, 2010 at 9:40 pm #

    Not sure about CSS, but I will give it a try to compress my javascripts. But again, compressing javascripts like Adsense code can result in your account ban. SO I better be careful. :P
    .-= TechChunks´s latest blog ..Control Gecko With Your Fingertips: GTA Chinatown Wars on iPhones [Video Game Review] =-.

    • January 29, 2010 at 11:06 pm #

      Dude, There is an option to exclude the Files which we dont want to compress, so I guess that will work, Talking abt Adsense, it has not yet accepted me, :D

    • January 30, 2010 at 10:02 am #

      I think your posts like the one where you mentioned how to get Gtalk passwords of others (and other such posts) is the reason why you haven’t been approved by Adsense yet!

      I would suggest you to try applying from another blog (could be a free blogspot blog too. I had my Adsense approved when I didn’t have any self hosted blog. So it is very much possible). Good luck buddy :)
      .-= TechCHunks´s latest blog ..Twitter Planning to Adopt Technological Ways to Stop the 140-Character Censor =-.

  3. January 29, 2010 at 11:03 pm #

    Nice Way to Compress Javascript and CSS files!
    Thanks Ram
    .-= Chethan´s latest blog ..A Complete Guide on Assembling a Gaming PC =-.

    • January 29, 2010 at 11:06 pm #

      Welcome Chetan :)

  4. how to ollie
    January 31, 2010 at 12:49 am #

    Good post… I’m always on the lookout for good blogs.

  5. January 31, 2010 at 2:55 pm #

    i also had some small problems with these plugins… but its better to try them :D trying won’t hurt your site…… :D anyway, thanks for sharing bro!
    .-= Pubudu Kodikara´s latest blog ..Want to Completely Uninstall a Program Without Leaving Junk? =-.

    • February 1, 2010 at 9:23 am #

      Oh, Dude, try not to have any other compressing plugin along with it, that case they conflict each other.

  6. Tinh
    January 31, 2010 at 3:02 pm #

    I have tried this but it conflicted with other plugins which has the same function. Thanks
    .-= Tinh´s latest blog ..How To Show Drop Caps Automatically in Thesis Theme =-.

    • February 1, 2010 at 9:22 am #

      Ya i know, typically Web Optimizer plugin, but it is good to use just the Minify, because they combine both css and js.

  7. April 26, 2011 at 3:16 pm #

    Is it OK to use this with W3 Total Cache? Or is this just doing the same thing, but differently :\

Leave a Reply