A document [1] by Ray Cromwell introduces an aid for JS compression, both theory and implementation [2]. The idea is to transform JS code before compression in a way that, while keeping JS semantics, makes is best possible candidate for the popular gzip deflate compression.<p>----<p>[1] <a href="http://timepedia.blogspot.com/2009/08/on-reducing-size-of-compressed.html" rel="nofollow">http://timepedia.blogspot.com/2009/08/on-reducing-size-of-co...</a><p>[2] <a href="http://code.google.com/p/google-web-toolkit/source/detail?r=5972" rel="nofollow">http://code.google.com/p/google-web-toolkit/source/detail?r=...</a>
<i>cough</i> your server could serve gzipped stream and the browser would transparently uncompress it.<p>Sure there are browsers that can't decompress these streams, but your webserver already knows when to send the full (but minified) JS instead. Its all handled automatically.
This is a great process to maximize your JS compression. However, it's important to keep in mind the application. From the jQuery dl page (yes, they use a different compression method):<p>"The packed versions require non-trivial client-side processing time to uncompress (unpack) the code whereas the minified versions do not."