4 ms·
There aren't really any risks involved aside from the fact that most (all?) compressors expect well-formed scripts, and thus can break ones that don't meet stan
by qhoxie 18y ago
There aren't really any risks involved aside from the fact that most (all?) compressors expect well-formed scripts, and thus can break ones that don't meet standards.
A common way to do compression that will give you a similar effect is to gzip content from the web server.
- prashantdesale 18y agoThanks a lot.
- nostrademons 18y agoIn particular, most compressors are picky about semicolons. If you use JavaScript's implicit line breaking, they'll break. This includes function definitions: there should be a semicolon after each function definition, something that most JavaScript programmers forget. I find that using JSMin + GZip (on the webserver level) compresses just as well and tends to break fewer things.