Javascript And Css Compression Using YUI Compressor

  • "yui-compressor.jar" is a utility from Yahoo for Css and Java script compression.
  • This utility is written Java language.It need minimum of java version 1.4 and above.
  • It uses Mozilla's "Rhino" library for compressing Java script code. 
  •  It has Used Isaac Schlueter  Regular Expresion based Algorithm for Css Minification.
  • To know more and Download Link:-

  • This Demo, "Shows How to use this jar file in windows command prompt to get minified  java script file".

  • After downloading the yui compressor jar file set it in the System PATH variable.We can verify by issuing help option in command prompt.

  • The screenshot below shows the java script compression which produced a "min" file.
  •  Lets compress a java script file, I have taken  "yui.js" file for compression.This original file size is 328 KB  . Here we are compressing this file and saving the file as "sandeep-yui-min.js" file. See the below screenshot,