views:

97

answers:

2

I've been looking for a way to easily compress my .js locally before deployment. I finally found a command line batch script that works with YUICompressor and Packer.

The problem I was having was that Packer was corrupting my files. Figuring it was an older version, I just manually took my YUIcompressed .js and ran it through the online Packer.

The result is that PACKER only reduces my YUIcompressed ..js by about 1%. Hardly worth the effort, it seems.

That said, I don't know much about Packer. Doing some research, it seems that YUICompressor and Packer are really both separate .js compressors. Is there really a need to use both? Do people use both? If so, why? Does Packer do something above and beyond compression?

+1  A: 

Packer is not recommended. It takes time for the client to unpack, erasing all gains from the smaller file size. I don't think there is any reason to use it.

YUICompressor is very good and using it alone is sufficient.

Jourkey
That pretty much confirms my experience thus far. Thanks for the info!
DA
A: 

Don't forget, there's a .NET port of YUICompressor found here on codeplex, called YUICompressor for .NET. That might also help...

*Disclaimer: I made most of that port.

Pure.Krome