2

Okay guys, so what I do already.I have a website (http://walshdidthat.com/) that hosted on Godaddy + using an Amazon ClounFront for static files.

I'm testing the website here - https://gtmetrix.com/reports/walshdidthat.com/OPVOSdVg

In the Yslow stats the system tell's me: Add Expires headers , grade 0.

Please, could you give me a wording advice. In cloudfront I set TTL's, and set max-age for every uploaded file(but it's not an 'expire' variable, as I can see it now).

I have .htaccess on my host that contain:

.....
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 year"
.... etc

Please give me an example how could I set expires setting for files on cloudfront , with example please(because I read the official documentation and they have only 1 example -' "Mon" 23:59:59 ' - that is a total BS and doesn't work.

Great Serg
  • 71
  • 1
  • 2
  • 10
  • You shouldn't be using `Expires` and nobody should be telling you to. It's deprecated in favor of `Cache-Control`. You should be using something like `Cache-Control: max-age=...` (where `...` is an integer number of seconds). – Michael - sqlbot Mar 03 '17 at 23:49
  • 1
    Yes mate, I doing the same for all files I upload, but in the gtmetrix I still have the message about 'expires' – Great Serg Mar 03 '17 at 23:55

0 Answers0