• Hello,
    Using Google PageSpeed I can’t find the way to resolve the Browser Caching error/warning.
    I have tried W3 Total Cache, plugins that are supposed to specify that and even editing my .htaccess, but nothing happens. I know I can’t handle external files, but it keeps appearing imagens of my website.
    Does anybody solved it?
    Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Link to site so we can see what’s up?

    I suspect what it is complaining about are third party items outside your website which W3 Total Cache can’t do anything about. On mine it complains about stuff from accuweather and Twitter which are widgets on my site which I have no control over, other than not using them.

    Now, if it is indeed complaining about images on your website, you need to add something like the following to your .htaccess file (above the WordPress section):

    <IfModule mod_expires.c>
              <FilesMatch "\.(jpe?g|png|gif|ico|js|css|woff)$">
                          ExpiresActive On
                          ExpiresDefault "access plus 2 month"
              </FilesMatch>
    </IfModule>

    This will cache most of the static items for 2 months. Might also contact your webhost to see if they can help.

    Thread Starter roxer82

    (@roxer82)

    Thanks for the answer. That’s what we have now, but some of our images are still as errors.

    <IfModule mod_expires.c>
         ExpiresActive On
         ExpiresByType image/gif A14400
         ExpiresByType image/png A14400
         ExpiresByType image/jpg A14400
         ExpiresByType image/x-icon A14400
         ExpiresByType application/pdf A14400
         ExpiresByType application/x-javascript A14400
         ExpiresByType text/plain A14400
         ExpiresByType text/css A14400
    </IfModule>
    • This reply was modified 7 years, 8 months ago by roxer82.

    Without a link to your site, hard to verify what mime types and actual cache values are being sent in the response headers.

    I ran the site listed in your profile through Google Page Insights and found no references to images on your site. Everything listed in the browser cache section were 3rd-party items. Were you possibly looking at the Optimize Images section which does list some at your site?

    Specific image you have that isn’t being cached in case it’s on some post?

    Thread Starter roxer82

    (@roxer82)

    Sorry, I forgot.
    My site es Econoblog.com.ar, but I’m not checking the index, I’m checking entries. e.g.: Talleres de ANSES sobre Retiro Laboral

    Ok, I see it now. Looks like it’s complaining about them only being cached for 4 hours which is how long 14,400 seconds is.

    Try this instead:

    <IfModule mod_expires.c>
         ExpiresActive On
         ExpiresByType image/gif "access plus 1 month"
         ExpiresByType image/png "access plus 1 month"
         ExpiresByType image/jpg "access plus 1 month"
         ExpiresByType image/x-icon "access plus 1 month"
         ExpiresByType application/pdf "access plus 1 month"
         ExpiresByType application/x-javascript "access plus 1 month"
         ExpiresByType text/plain "access plus 1 month"
         ExpiresByType text/css "access plus 1 month"
    </IfModule> 
    Thread Starter roxer82

    (@roxer82)

    MarkRH, we used 4 hours because that’s what Google sugested. I’ll try that. Thanks.

    Thread Starter roxer82

    (@roxer82)

    MarkRH, thanks for your answer.
    I tried your code, but nothing changed. Google SpeedPage still says there are images in my page that are not being cached:

    …ent/themes/leaf/images/EconoCabecera.jpg (4 horas)
    …p-content/themes/leaf/images/body-BG.png (4 horas)
    …ntent/themes/leaf/images/mobile-menu.png (4 horas)
    …ent/themes/leaf/images/scroll-to-top.png (4 horas)
    …tent/themes/leaf/images/transparente.gif (4 horas)
    …des/js/wp-emoji-release.min.js?ver=4.7.3 (4 horas)

    Any idea?
    Thanks.

    • This reply was modified 7 years, 8 months ago by roxer82.
    • This reply was modified 7 years, 8 months ago by roxer82.
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Google PageSpedd and Leverage Browser Caching’ is closed to new replies.