[Phpwm] [phpwm] Best js compression techniques?

Dave Holmes dave at neteffekt.co.uk
Tue Dec 1 07:42:02 UTC 2009


Echo everything David suggests is good, just to add to that list there
is something I have mentioned on list before which gave us a massive
boost. 

We used to have a lot of JS files which we used to segment and
modularise our code just to make it manageable - the down side to this
was browsers download JS serially to resolve dependencies and  not in
parallel like other page assets. Combining multiple JS files into one
then minifying will help you out also. 

If you are using a build process of course you could get it to
concatenate your nice manageable files into one and compress. 


On Mon, 2009-11-30 at 16:54 +0000, David Goodwin wrote:

> Gavin Kimpson wrote:
> > Hi guys,
> > 
> > I'm building a web application that is kinda heavy on the javascript -
> > and there does seem some slowdown because of it, what techniques do
> > you guys use to 'speed up' your javascript in your web-apps?
> > 
> > Cheers
> 
> 
> a) make sure Apache / whatever gzip compresses it as it goes out
> b) make sure Apache / whatever sets good expirey headers (i.e. some time 
> in the future)
> c) host the JS files on a different domain name (or use e.g. Google's JS 
> library hosting)
> 
> 
> There are obviously whitespace removers/minifiers etc, but I'd expect 
> them to not be all that better than e.g. mod_deflate on apache
> 
> David.
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.lug.org.uk/pipermail/phpwm/attachments/20091201/a57ab586/attachment-0001.htm 


More information about the Phpwm mailing list