[Chameleon] compress Chameleon javascript
Delfos, Jacob
Jacob.Delfos at maunsell.com
Thu May 11 19:08:51 EDT 2006
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/|
> +-----------------------------------------------------------------+
>
>
>
>
>
More information about the Chameleon
mailing list