Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top