• Hello!

    I “pingdomed” my website and got this message:

    The following cacheable resources have a short freshness lifetime. Specify an expiration at least one week in the future for the following resources:

    Then there is a list of images (40 pcs) and google fonts that have apparently this issue. Now, I’m not too concerned about the fonts but what can I do to those images? I use WP Super Cache. This is quite important since the pages load so slowly :/ Otherwise I wouldn’t bother 😀

    Many thanks,
    Emilia

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello!

    Haven’t used WP Super Cache in years, so I can’t remember it well, but I assume they should have an option like Browser Caching / Expires Headers. That should add some code in your .htaccess file, like this:

    ## EXPIRES CACHING ##
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg "access plus 1 year"
    ExpiresByType image/jpeg "access plus 1 year"
    ExpiresByType image/gif "access plus 1 year"
    ExpiresByType image/png "access plus 1 year"
    ExpiresByType text/css "access plus 1 month"
    ExpiresByType application/pdf "access plus 1 month"
    ExpiresByType text/x-javascript "access plus 1 month"
    ExpiresByType application/x-shockwave-flash "access plus 1 month"
    ExpiresByType image/x-icon "access plus 1 year"
    ExpiresDefault "access plus 2 days"
    </IfModule>
    ## EXPIRES CACHING ##

    The expiration time depends on how frequent some of your files are being updated, so you can change that.

    If you can’t find something like that in your .htaccess file, then you can add it manually, copy-paste.

    The .htaccess file is in your root directory, and you can edit it via FTP or Yoast by going to SEO -> Tools -> File Editor. This feature might be disabled by some security plugins, if you’re using any.

    Create a backup of at least your .htaccess file before editing it.

    Note that you can’t set expiration dates for 3rd party, like Google Fonts, Facebook scripts, CDN files, etc.

    Thread Starter sakulainen

    (@sakulainen)

    Hello,

    Thank you Blade for your help! Unfortunately, it didn’t make the site much faster (I copy-pasted). Can the problem be somewhere else? I have had WPML and iThemes Security. They are still added as plugins but they are inactive. I’m afraid of deleting them since I’m worried that it would harm the site ( most plugins add some codes to various files, right?). Is there logic in my thinking? 😀

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Cacheable resources have a short freshness lifetime’ is closed to new replies.