A minifier removes the comments and unnecessary whitespace from a program. Depending on how the program is written, this can reduce the size by about half.
An obfuscator also minifies, but it will also make modifications to the program, changing the names of variables, functions, and members, making the program much harder to understand, and further reducing its size in the bargain. Some obfuscators are quite aggressive in their transformations … Any transformation carries the risk of introducing a bug. Even if the obfuscator didnâ€™t cause the bug, the fact that it might have is a distraction which will slow down the debugging process.
After minifying or obfuscating, you should GZIP. GZIP can further reduce the size of the program. GZIP is so effective that the difference in the efficiency between minification and obfuscation becomes insignificant. So I prefer minification with GZIP because I donâ€™t have time for programming tools that can inject bugs into good programs.
Posted by Michael Mahemoff at 6:17 am