Search code examples
http-headersapacheyslowmod-expires

yslow still not giving me an A for expires header in apache httpd even though I added them


trying to add an ExpiresDefault ExpiresByType to content on my website so that way it is cached. I use cachebusting in the URL (a revision number in the path) for Javascript, CSS, and images so that way I can set it to forever for these mimetypes. I have the following rules set up in apache httpd:

  ExpiresActive On
  ExpiresDefault "access plus 1 minutes"
  ExpiresByType image/gif "access plus 10 years"
  ExpiresByType image/png "access plus 10 years"
  ExpiresByType image/jpeg "access plus 10 years"
  ExpiresByType image/jpg "access plus 10 years"
  ExpiresByType text/javascript "access plus 10 years"
  ExpiresByType text/css "access plus 10 years"

Then when I go to my website http://karmerd.com and use httplive headers to look at the headers I get what I think should be the correct Expires for css: Expires: Sun, 03 Feb 2019 17:52:48 GMT

But I use Yahoo's Yslow firebug extension and it's still giving me an F for not using Expires! Am I doing something wrong? I'm also using gravatars on my site, but they have Expires set. Seems like everything has an expires. Is it Yslow or me?


Solution

  • Your javascript files are being sent out as application/x-javascript, so aren't getting a far-future Expires header.