Forum Moderators: phranque

Message Too Old, No Replies

Leverage browser caching

         

trogladyte

11:38 pm on Jan 28, 2012 (gmt 0)

10+ Year Member



I admit, with embarrassment,that, after 2 years website designing, I have been woken up to page speed loading in a decent way. :-)

I use Joomla and there's a really good set of plugins to help, but there are still some areas needing further help, such as "Leverage browser caching" according to Google's page speed page. My site - www.citruskiwi.com - scores 72 there, yet the Page speed and Yslow plugins for Firefox score it higher with not the same errors. Can't figure that out. Anyone have ideas?

But my main problem is setting expires. I did it fine on a small, no-so-important site, and got rid of all the "expiration not specified" errors. So I used the same code on Citruskiwi and it made no difference. I still have a huge bunch of image files stating that no expiration is specified. The code used is:

## EXPIRES CACHING ##

ExpiresActive On
ExpiresByType image/jpg A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType image/gif A2592000
ExpiresByType image/png A2592000
ExpiresByType text/css A2592000
ExpiresByType application/pdf A2592000
ExpiresByType text/x-javascript A2592000
ExpiresByType application/x-shockwave-flash A2592000
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 7 days"

## EXPIRES CACHING ##


As I said, this code is identical to what I used on the first site.

Can anyone shed light on why it works on one and not another? Thanks.

penders

12:19 am on Jan 29, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If you examine the response headers yourself do you not see appropriate Expires/Cache-Control headers set? What's the x- in text/x-javascript?

trogladyte

1:04 am on Jan 29, 2012 (gmt 0)

10+ Year Member



Yes, I can see the correct expires set (had to figure out how to do it first!) and now Google Page Speed is reporting properly.

It seems as if the page takes a while to correctly report the results. I have rechecked a number of other sites, and they have all behaved the same way.