[Chameleon] compress Chameleon javascript

Eijnden, B. van den (Bart) b.vdeijnden at agi.rws.minvenw.nl
Fri May 12 05:22:00 EDT 2006


I have used mod_deflate in the past with Apache 2, but not for a Chameleon
project.

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.

Best regards,
Bart

-----Oorspronkelijk bericht-----
Van: chameleon-bounces at lists.maptools.org
[mailto:chameleon-bounces at lists.maptools.org]Namens Delfos, Jacob
Verzonden: vrijdag 12 mei 2006 1:19
Aan: Paul Spencer
CC: chameleon at lists.maptools.org
Onderwerp: RE: [Chameleon] compress Chameleon javascript


Or possibly even better, applying compression to all output from the
Apache server, as in:

http://httpd.apache.org/docs/2.0/mod/mod_deflate.html

I tried the line:

 AddOutputFilterByType DEFLATE text/html text/plain text/xml

But firefox did not indicate a change in document size (which may not
mean it didn't work).
Has anyone ever experimented with this?

Regards

Jacob



> -----Original Message-----
> From: chameleon-bounces at lists.maptools.org 
> [mailto:chameleon-bounces at lists.maptools.org] On Behalf Of 
> Delfos, Jacob
> Sent: 12 May 2006 07:09
> To: Paul Spencer
> Cc: chameleon at lists.maptools.org
> Subject: RE: [Chameleon] compress Chameleon javascript
> 
> Paul,
> 
> I just tried applying gzip compression on the actual page (main
> document), by adding "ob_start("ob_gzhandler");" to the start of
> index.phtml, which launches the site. According to Firefox, 
> the document
> size went down from 200kb to 31kb. That is huge, considering the main
> page is loaded everytime a layer is changed. Is there any 
> objection that
> you know of against doing this?
> 
> Internet explorer reported the same filesize, though. Is this 
> because it
> reports the filesize after compression? Is there a way to test this?
> 
> Would it be possible to run index.phtml through a script like
> getcjs.php?
> 
> Regards,
> 
> Jacob
> 
>  
> 
> > -----Original Message-----
> > From: Paul Spencer [mailto:pspencer at dmsolutions.ca] 
> > Sent: 11 May 2006 18:24
> > To: Delfos, Jacob
> > Cc: Eijnden, B. van den (Bart); Bart van den Eijnden; 
> > chameleon at lists.maptools.org
> > Subject: Re: [Chameleon] compress Chameleon javascript
> > 
> > For the record, I didn't change the algorithm :)  I just added  
> > multiple files and removed the assumption of .js and added the  
> > ob_start with gzip compression.  I found its about 8 times  
> > compression of javascript (about 4 with just gzip and 2 with  
> > whitespace/comment removal)
> > 
> > It would be nice if we re-worked chameleon to spit all its 
> > javascript  
> > out into a single, temporary javascript file that could be cached/ 
> > loaded like this.
> > 
> > Cheers
> > 
> > Paul
> > 
> > On 11-May-06, at 3:31 AM, Delfos, Jacob wrote:
> > 
> > > Hi Bart,
> > >
> > > I have modified the Ka-Map version to work with 
> Chameleon, though  
> > > it would require a bit of alternations to Chameleon to 
> make use of  
> > > the feature of compressing multiple JavaScript files to 
> one stream.
> > >
> > > I have attached the new file. UIManager.php had to be changed,  
> > > because the new getcjs.php expects ".js" extensions.
> > >
> > > regards,
> > >
> > > Jacob
> > >
> > >
> > > From: Eijnden, B. van den (Bart)  
> > > [mailto:b.vdeijnden at agi.rws.minvenw.nl]
> > > Sent: 11 May 2006 14:34
> > > To: Delfos, Jacob; Bart van den Eijnden; 
> > chameleon at lists.maptools.org
> > > Subject: RE: [Chameleon] compress Chameleon javascript
> > >
> > > Hi Jacob,
> > >
> > > cool, could you please backfix the missing semi-colon to the 2.4  
> > > branch?
> > >
> > > Also, the ka-map script removes comments and whitespace, 
> but also  
> > > sends the javascript gzip compressed. You should check that 
> > one out  
> > > (I have attached it), I am sure you can get it to go be 
> > around 50 Kb.
> > >
> > > Best regards,
> > > Bart
> > >
> > > <JS_compress2.zip>
> > > _______________________________________________
> > > Chameleon mailing list
> > > Chameleon at lists.maptools.org
> > > http://lists.maptools.org/mailman/listinfo/chameleon
> > 
> > +-----------------------------------------------------------------+
> > |Paul Spencer                           pspencer at dmsolutions.ca   |
> > +-----------------------------------------------------------------+
> > |Applications & Software Development                              |
> > |DM Solutions Group Inc                 http://www.dmsolutions.ca/|
> > +-----------------------------------------------------------------+
> > 
> > 
> > 
> > 
> > 
> 
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
> 

_______________________________________________
Chameleon mailing list
Chameleon at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/chameleon



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.
************************************************************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/chameleon/attachments/20060512/8ad0e8fa/attachment-0001.html


More information about the Chameleon mailing list