[ka-Map-users] compressed javascript update
Paul Spencer
pspencer at dmsolutions.ca
Tue Mar 21 14:11:30 EST 2006
All,
I've gone through all the code to get it to work with getcjs.php
again. I've also modified getcjs.php to handle compressing multiple
files into a single file and to use ob_gzhandler (gzip compression).
AFAIK, gzip compression is seamless and negotiates with the browser
to determine if the browser supports it or not.
Compression strips white space and comments (but its not very
intelligent, so it can be fooled). Combining gzip compression with
white space removal and comment stripping has resulted in a reduction
of the size of the javascript from
kaKeymap.js : 13.1 kb
kaLegend.js : 20.1 kb
kaMap.js : 75.9 kb
kaQuery.js : 9.1 kb
kaTool.js : 14.2 kb
scalebar.js : 23.1 kb
startUp.js : 15.1 kb
total: 170.5 kb
to a compressed value of: 20.7 kb
To enable this in your application, follow the comments at the top of
index.html in the cvs version.
Cheers
Paul
+-----------------------------------------------------------------+
|Paul Spencer pspencer at dmsolutions.ca |
+-----------------------------------------------------------------+
|Applications & Software Development |
|DM Solutions Group Inc http://www.dmsolutions.ca/|
+-----------------------------------------------------------------+
More information about the ka-Map-users
mailing list