Support » Fixing WordPress » Add Expires headers

  • Hello,

    At GTmetrics for Yslow score, I am at zero, I have tried several plugin but nothing changed, do you have any suggestion?

    Many thanks,

    Thibaut

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Forum Moderator & Support Team Volunteer

    Thanks for the reply. I’ve tried it again but it is not working…. any other idea?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Forum Moderator & Support Team Volunteer

    I use this in my .htaccess file:

            <IfModule mod_expires.c>
            # Turn on the module.
            ExpiresActive on
            # Set the default expiry times.
            ExpiresDefault "access plus 2 days"
            ExpiresByType image/jpg "access plus 1 month"
            ExpiresByType image/gif "access plus 1 month"
            ExpiresByType image/jpeg "access plus 1 month"
            ExpiresByType image/png "access plus 1 month"
            ExpiresByType text/css "access plus 1 month"
            ExpiresByType text/javascript "access plus 1 month"
            ExpiresByType application/javascript "access plus 1 month"
            ExpiresByType application/x-shockwave-flash "access plus 1 month"
            ExpiresByType text/css "now plus 1 month"
            ExpiresByType image/ico "access plus 1 month"
            ExpiresByType image/x-icon "access plus 1 month"
            ExpiresByType text/html "access plus 600 seconds"
            </IfModule>
    
    

    Note that GTmetrix will give you a poor score if *any* file is not cached, but most is better than nothing. Do not put too much stock in it.

    With that code, plus the plugins autoptimize and comet cache, I easily get A scores on Google Pagespeed.

    sorry not working for me, I tried other codes that I found on the net as well, I guess I have to give-up…. thanks anyway!

    Based on the GTmetrix report, some 3rd party resources do not have expiry headers. Nothing much you can do about them. You can try contact the 3rd parties.

    refer: https://gtmetrix.com/reports/www.thibautgoarant.com/ZjsOqhvv

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Add Expires headers’ is closed to new replies.