coppermine-gallery.com/forum

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: flapane on November 11, 2010, 08:45:11 PM

Title: Compressing js files
Post by: flapane on November 11, 2010, 08:45:11 PM
Just wondering if compressing (before releasing the next public version of CPG, so that the average user will already have optimized js files) the biggest javascript files would worth anything.
I managed to save about 60% by compressing the biggest 9 files (jquery among other) in /js folder, that means a little bit more than 100kB.
Would Google spiders or an user with a slower connection be positively affected?
Title: Re: Compressing js files
Post by: Αndré on November 12, 2010, 09:57:30 AM
Try that (http://forum.coppermine-gallery.net/index.php/topic,63223.0.html) plugin.
Title: Re: Compressing js files
Post by: flapane on November 12, 2010, 11:51:37 AM
That's not what I was exactly talking about.
As you can see, the plugin is in an early development stage and I don't want to try it at the moment, while I already manually compressed the js files, and was trying to understand (suggest) if it was a good thing to do it in the development stage (read: you and the other developers) just after the coding has finished, so that every user who will visit a coppermine gallery, will save some bandwith.
Title: Re: Compressing js files
Post by: Αndré on November 12, 2010, 12:01:27 PM
I don't know the different compression methods, so I cannot decide that. Methods that makes the js file unreadable are out of the question, at least for the development branch. But as Coppermine is a picture gallery, the size of the js files shouldn't be that bad.
Title: Re: Compressing js files
Post by: Stramm on November 12, 2010, 05:56:17 PM
If you need compression badly best is to do that with an apache module, e.g. mod_deflate http://httpd.apache.org/docs/2.0/mod/mod_deflate.html
Or google for mod_gzip