Google's compression and caching suggestions - how to?

Ingenious

Well-known member
I just tried a page speed test on Google and my forum scores 66 out of 100.

It says a high priority is to compress the .js files - is this something I can do easily myself (is there a setting in xf?).

It also says a number of files can be cached in the browser, as there is currently no expiry set on them. This includes some advertiser graphics and all the header, footer and node graphics. I agree these don't change often, so could be cached. Again, how is this set (I am on shared hosting so would guess this is done either in Xenforo settings, or .htaccess).
 
66 is pretty low score for a Xenforo site - scoring higher than 90 is pretty easy.
(and yes, I speak about sites using advertising, Piwik and all the bells and whistles)
 
That's encouraging. Is there a good guide for Xenforo sites on how to get up to 90 or so, or can we get some useful info together in this thread?

I just tried the stock Xenforo site and it scores 91. So I need to put right what went wrong when I customised it ;)

I understand what Google is telling me, just not how I can implement it into my site.
 
Also what does it mean when it says I should "Losslessly compress" some images, how can I losslessly compress a JPEG, does it mean change it to a PNG? I thought I was quite aggressive with my compession, though I do use GIF and I think Google is telling me that PNG is best.
 
Also what does it mean when it says I should "Losslessly compress" some images, how can I losslessly compress a JPEG, does it mean change it to a PNG? I thought I was quite aggressive with my compession, though I do use GIF and I think Google is telling me that PNG is best.
You can losslessly compress using a tool like http://smush.it. You can even run it from a command-line to do a batch of files at one time:

http://abhirama.wordpress.com/2010/10/20/a-command-line-tool-to-run-smush-it/
 
Top Bottom