This one is driving me nuts.
I get a score of 80% for YSlow and 82% for Google Speed Grades.
However, I get an 'F' score for the "Add Expires headers" section
of the analysis result page of gtmetrix.com for my site. Below is a snippet of the detailed report:
There are 12 static components without a far-future expiration date.
OKAY, so I set out to add far future expiration dates to these file types,
and so far I have failed spectacularly. Miserably. Desperately.
What did I do?
First, I checked that mod_expires was actually already installed on my Centos.
A quick linux command of httpd -M of revealed that it was installed.
So I merrily edited my /etc/httpd/conf/httpd.conf file by adding in this code:
# CONFIGURE media caching
Header unset ETag
LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
ExpiresDefault "access plus 1 year"
After that, I restarted Apache with this code:
AND I STILL GET AN 'F' GRADE FOR "Add Expires Headers". See attached jpg.
A few more details:
My Php version (running on Moodle 1.9.7) is 5.2.17. I don't have any .htaccess file in my root (/) directory. Oh yeah, I'm also
running eAccelerator on my site, mod_deflate and munin reports.
If I can get the far -future expiration date for my static files to work,
that would be almost perfect. I would be thrilled, ecstatic and over the moon.
This would bump my YSlow and Page Speed Grades up a couple of notches.
Can any kind soul on Moodle.org advise me - what am I not doing right???