<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2658.24">
<TITLE>RE: [Chameleon] compress Chameleon javascript</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>I have used mod_deflate in the past with Apache 2, but not for a Chameleon project.</FONT>
</P>
<P><FONT SIZE=2>I think the outcome will be the same as the PHP way, only the PHP way can also be used with IIS. As far as I know, there is no non-commercial mod_deflate for IIS.</FONT></P>
<P><FONT SIZE=2>Best regards,</FONT>
<BR><FONT SIZE=2>Bart</FONT>
</P>
<P><FONT SIZE=2>-----Oorspronkelijk bericht-----</FONT>
<BR><FONT SIZE=2>Van: chameleon-bounces@lists.maptools.org</FONT>
<BR><FONT SIZE=2>[<A HREF="mailto:chameleon-bounces@lists.maptools.org">mailto:chameleon-bounces@lists.maptools.org</A>]Namens Delfos, Jacob</FONT>
<BR><FONT SIZE=2>Verzonden: vrijdag 12 mei 2006 1:19</FONT>
<BR><FONT SIZE=2>Aan: Paul Spencer</FONT>
<BR><FONT SIZE=2>CC: chameleon@lists.maptools.org</FONT>
<BR><FONT SIZE=2>Onderwerp: RE: [Chameleon] compress Chameleon javascript</FONT>
</P>
<BR>
<P><FONT SIZE=2>Or possibly even better, applying compression to all output from the</FONT>
<BR><FONT SIZE=2>Apache server, as in:</FONT>
</P>
<P><FONT SIZE=2><A HREF="http://httpd.apache.org/docs/2.0/mod/mod_deflate.html" TARGET="_blank">http://httpd.apache.org/docs/2.0/mod/mod_deflate.html</A></FONT>
</P>
<P><FONT SIZE=2>I tried the line:</FONT>
</P>
<P><FONT SIZE=2> AddOutputFilterByType DEFLATE text/html text/plain text/xml</FONT>
</P>
<P><FONT SIZE=2>But firefox did not indicate a change in document size (which may not</FONT>
<BR><FONT SIZE=2>mean it didn't work).</FONT>
<BR><FONT SIZE=2>Has anyone ever experimented with this?</FONT>
</P>
<P><FONT SIZE=2>Regards</FONT>
</P>
<P><FONT SIZE=2>Jacob</FONT>
</P>
<BR>
<BR>
<P><FONT SIZE=2>> -----Original Message-----</FONT>
<BR><FONT SIZE=2>> From: chameleon-bounces@lists.maptools.org </FONT>
<BR><FONT SIZE=2>> [<A HREF="mailto:chameleon-bounces@lists.maptools.org">mailto:chameleon-bounces@lists.maptools.org</A>] On Behalf Of </FONT>
<BR><FONT SIZE=2>> Delfos, Jacob</FONT>
<BR><FONT SIZE=2>> Sent: 12 May 2006 07:09</FONT>
<BR><FONT SIZE=2>> To: Paul Spencer</FONT>
<BR><FONT SIZE=2>> Cc: chameleon@lists.maptools.org</FONT>
<BR><FONT SIZE=2>> Subject: RE: [Chameleon] compress Chameleon javascript</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Paul,</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> I just tried applying gzip compression on the actual page (main</FONT>
<BR><FONT SIZE=2>> document), by adding "ob_start("ob_gzhandler");" to the start of</FONT>
<BR><FONT SIZE=2>> index.phtml, which launches the site. According to Firefox, </FONT>
<BR><FONT SIZE=2>> the document</FONT>
<BR><FONT SIZE=2>> size went down from 200kb to 31kb. That is huge, considering the main</FONT>
<BR><FONT SIZE=2>> page is loaded everytime a layer is changed. Is there any </FONT>
<BR><FONT SIZE=2>> objection that</FONT>
<BR><FONT SIZE=2>> you know of against doing this?</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Internet explorer reported the same filesize, though. Is this </FONT>
<BR><FONT SIZE=2>> because it</FONT>
<BR><FONT SIZE=2>> reports the filesize after compression? Is there a way to test this?</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Would it be possible to run index.phtml through a script like</FONT>
<BR><FONT SIZE=2>> getcjs.php?</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Regards,</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Jacob</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> > -----Original Message-----</FONT>
<BR><FONT SIZE=2>> > From: Paul Spencer [<A HREF="mailto:pspencer@dmsolutions.ca">mailto:pspencer@dmsolutions.ca</A>] </FONT>
<BR><FONT SIZE=2>> > Sent: 11 May 2006 18:24</FONT>
<BR><FONT SIZE=2>> > To: Delfos, Jacob</FONT>
<BR><FONT SIZE=2>> > Cc: Eijnden, B. van den (Bart); Bart van den Eijnden; </FONT>
<BR><FONT SIZE=2>> > chameleon@lists.maptools.org</FONT>
<BR><FONT SIZE=2>> > Subject: Re: [Chameleon] compress Chameleon javascript</FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > For the record, I didn't change the algorithm :) I just added </FONT>
<BR><FONT SIZE=2>> > multiple files and removed the assumption of .js and added the </FONT>
<BR><FONT SIZE=2>> > ob_start with gzip compression. I found its about 8 times </FONT>
<BR><FONT SIZE=2>> > compression of javascript (about 4 with just gzip and 2 with </FONT>
<BR><FONT SIZE=2>> > whitespace/comment removal)</FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > It would be nice if we re-worked chameleon to spit all its </FONT>
<BR><FONT SIZE=2>> > javascript </FONT>
<BR><FONT SIZE=2>> > out into a single, temporary javascript file that could be cached/ </FONT>
<BR><FONT SIZE=2>> > loaded like this.</FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > Cheers</FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > Paul</FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > On 11-May-06, at 3:31 AM, Delfos, Jacob wrote:</FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > > Hi Bart,</FONT>
<BR><FONT SIZE=2>> > ></FONT>
<BR><FONT SIZE=2>> > > I have modified the Ka-Map version to work with </FONT>
<BR><FONT SIZE=2>> Chameleon, though </FONT>
<BR><FONT SIZE=2>> > > it would require a bit of alternations to Chameleon to </FONT>
<BR><FONT SIZE=2>> make use of </FONT>
<BR><FONT SIZE=2>> > > the feature of compressing multiple JavaScript files to </FONT>
<BR><FONT SIZE=2>> one stream.</FONT>
<BR><FONT SIZE=2>> > ></FONT>
<BR><FONT SIZE=2>> > > I have attached the new file. UIManager.php had to be changed, </FONT>
<BR><FONT SIZE=2>> > > because the new getcjs.php expects ".js" extensions.</FONT>
<BR><FONT SIZE=2>> > ></FONT>
<BR><FONT SIZE=2>> > > regards,</FONT>
<BR><FONT SIZE=2>> > ></FONT>
<BR><FONT SIZE=2>> > > Jacob</FONT>
<BR><FONT SIZE=2>> > ></FONT>
<BR><FONT SIZE=2>> > ></FONT>
<BR><FONT SIZE=2>> > > From: Eijnden, B. van den (Bart) </FONT>
<BR><FONT SIZE=2>> > > [<A HREF="mailto:b.vdeijnden@agi.rws.minvenw.nl">mailto:b.vdeijnden@agi.rws.minvenw.nl</A>]</FONT>
<BR><FONT SIZE=2>> > > Sent: 11 May 2006 14:34</FONT>
<BR><FONT SIZE=2>> > > To: Delfos, Jacob; Bart van den Eijnden; </FONT>
<BR><FONT SIZE=2>> > chameleon@lists.maptools.org</FONT>
<BR><FONT SIZE=2>> > > Subject: RE: [Chameleon] compress Chameleon javascript</FONT>
<BR><FONT SIZE=2>> > ></FONT>
<BR><FONT SIZE=2>> > > Hi Jacob,</FONT>
<BR><FONT SIZE=2>> > ></FONT>
<BR><FONT SIZE=2>> > > cool, could you please backfix the missing semi-colon to the 2.4 </FONT>
<BR><FONT SIZE=2>> > > branch?</FONT>
<BR><FONT SIZE=2>> > ></FONT>
<BR><FONT SIZE=2>> > > Also, the ka-map script removes comments and whitespace, </FONT>
<BR><FONT SIZE=2>> but also </FONT>
<BR><FONT SIZE=2>> > > sends the javascript gzip compressed. You should check that </FONT>
<BR><FONT SIZE=2>> > one out </FONT>
<BR><FONT SIZE=2>> > > (I have attached it), I am sure you can get it to go be </FONT>
<BR><FONT SIZE=2>> > around 50 Kb.</FONT>
<BR><FONT SIZE=2>> > ></FONT>
<BR><FONT SIZE=2>> > > Best regards,</FONT>
<BR><FONT SIZE=2>> > > Bart</FONT>
<BR><FONT SIZE=2>> > ></FONT>
<BR><FONT SIZE=2>> > > <JS_compress2.zip></FONT>
<BR><FONT SIZE=2>> > > _______________________________________________</FONT>
<BR><FONT SIZE=2>> > > Chameleon mailing list</FONT>
<BR><FONT SIZE=2>> > > Chameleon@lists.maptools.org</FONT>
<BR><FONT SIZE=2>> > > <A HREF="http://lists.maptools.org/mailman/listinfo/chameleon" TARGET="_blank">http://lists.maptools.org/mailman/listinfo/chameleon</A></FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > +-----------------------------------------------------------------+</FONT>
<BR><FONT SIZE=2>> > |Paul Spencer pspencer@dmsolutions.ca |</FONT>
<BR><FONT SIZE=2>> > +-----------------------------------------------------------------+</FONT>
<BR><FONT SIZE=2>> > |Applications & Software Development |</FONT>
<BR><FONT SIZE=2>> > |DM Solutions Group Inc <A HREF="http://www.dmsolutions.ca/|" TARGET="_blank">http://www.dmsolutions.ca/|</A></FONT>
<BR><FONT SIZE=2>> > +-----------------------------------------------------------------+</FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> _______________________________________________</FONT>
<BR><FONT SIZE=2>> Chameleon mailing list</FONT>
<BR><FONT SIZE=2>> Chameleon@lists.maptools.org</FONT>
<BR><FONT SIZE=2>> <A HREF="http://lists.maptools.org/mailman/listinfo/chameleon" TARGET="_blank">http://lists.maptools.org/mailman/listinfo/chameleon</A></FONT>
<BR><FONT SIZE=2>> </FONT>
</P>
<P><FONT SIZE=2>_______________________________________________</FONT>
<BR><FONT SIZE=2>Chameleon mailing list</FONT>
<BR><FONT SIZE=2>Chameleon@lists.maptools.org</FONT>
<BR><FONT SIZE=2><A HREF="http://lists.maptools.org/mailman/listinfo/chameleon" TARGET="_blank">http://lists.maptools.org/mailman/listinfo/chameleon</A></FONT>
</P>
<BR>
Disclaimer
************************************************************************
Aan dit bericht kunnen geen rechten worden ontleend. Dit bericht is
uitsluitend bestemd voor de geadresseerde. Als u dit bericht per abuis
hebt ontvangen, wordt u verzocht het te vernietigen en de afzender te
informeren. Wij adviseren u om bij twijfel over de juistheid of de
volledigheid van de mail contact met afzender op te nemen.
This message shall not constitute any rights or obligations.
This message is intended solely for the addressee.
If you have received this message in error, please delete it and
notify the sender immediately. When in doubt whether this message
is correct or complete, please contact the sender.
************************************************************************
<BR>
</BODY>
</HTML>