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 <[EMAIL PROTECTED]> wrote: > hm... i wonder if it is gzipped, then does the web server cache the > gzipped version, or does it gzip it every single time? > > by the way, i just edited the Wikipedia entry for prototype, noting > the gzipped size is more accurate. Otherwise it won't do prototype.js > justice. Maybe that table can be expanded to list also the gzipped > sizes as well. > > also... is it true that we don't need to minify it coz it saves only a > little? i thought even a little helps... and it only take a short > time to minify, and then it may be used by tens of millions of web > surfers world wide? thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---