[Cosmo-dev] Gzipping dojo.js
Jared Rhine
jared at wordzoo.com
Thu Feb 8 23:57:17 PST 2007
Props to everyone for the cool single-file compacted dojo.js. It's
about 444Kb.
I just filed an enhancement, #8071, to capture an idea about dropping
another 75% off of that. The body of that ticket:
---
The compiled dojo.js added in 0.6.0 is 444Kb. When gzipped (with
regular compression), the size is 114Kb.
One way to achieve gzipping would be with mod_deflate (which works).
However, since this resource is static, an even more clever solution
would be to statically gzip the resulting file, during build, and
configure Tomcat to serve the dojo.js.gz version when an Accept-Encoding
of gzip is received. (So both dojo.js and dojo.js.gz would be found
on-disk). In Apache, this would be simple (MultiViews and related
options). In Tomcat, I don't know the procedure.
This approach would get all the benefits of a remarkably compact dojo.js
(114K!) for no additional server CPU overhead.
---
I have mod_deflate working on lab.osaf.us, so we do have access to this
114Kb version already. Doing that statically though, and have that work
out of the box with snarf, would absolutely rock. No need to target for
any particular Cosmo release; it's just an idea filed into bugzilla for
reference.
-- Jared
More information about the cosmo-dev
mailing list