Hi,
> hm... i wonder if it is gzipped, then does the web server cache the
> gzipped version, or does it gzip it every single time?
It depends on the web server implementation. Nginx has specific
support for pre-gzipping things, called the "static gzip module".
Basically if it gets a request for the file "foo.html" from a gzip-
enabled client, it will look for foo.html.gz alongside foo.html in the
file system and, if found, use that to send back the gzipped result
without having to do it each time. Naturally you have to be sure your
deployment methodology prevents your updating foo.html and forgetting
to update foo.html.gz! No idea if Apache has a similar feature. I
mean, I'm sure it's possible with Apache through some form of hyper-
configuration (I'm pretty sure you can configure Apache to run NASA
and cure cancer), just no idea how easy or explicit it is.
> also... is it true that we don't need to minify it coz it saves only a
> little?
No. For instance, running Prototype through Crockford's jsmin[1]
takes it from 129,738 to 95,604 bytes (about 74% of the original
size). Gzipping those gives us 30,224 for the original, 23,969 for
the jsmin version, which is about 80% of the original size. So still
a substantial benefit, 6k out of 29.5k. jsmin is very conservative; I
would expect more aggressive ones like the modified version of
Edwards' Packer 3 that JDD uses that rename vars and such to give more
benefit.
[I'll emphasize that I *HAVE NOT* checked that jsmin'ing Prototype
doesn't introduce any problems. I haven't had trouble with jsmin
mucking up my own JavaScript though, as -- again -- it's quite
conservative.]
[1]
http://www.crockford.com/javascript/jsmin.html
--
T.J. Crowder
tj / crowder software / com
On Oct 10, 11:10 am, liketofindoutwhy <
liketofindout...@gmail.com>
wrote: