I was wondering if there was a way to compress javascript in realtime, much like gzip works for HTML (and CSS apparently)?
I don’t want to have to compress my file manually before upload everytime, I want the server to do it for me without any added work from lazy coders.
gzip works on all text, including JavaScript
If you want to do more compression (e.g. by using YUI compressor before gzipping) then you could get your server to do it, but it would be easier to do it before uploading.
The trick is to automate the build and publish process — so you run a script that does the compression then uploads the result, rather then drag’n’dropping files manually or similar.