solve google speed insights problem

Asked

Viewed 158 times

1

in google speed insights this error appears : "Enjoy browser cache Setting an expiration date or maximum age in HTTP headers for static resources instructs the browser to load previously downloaded resources from the local disk rather than via the network. Take advantage of browser caching for the following features that can be cached:" Which plugin solves this, or if there are no plugins, what is the best way to solve this problem?? hug to all!! thanks for the attention!

1 answer

1


Hi, Horacio.

It is not exactly plugin to be installed. The standards that influence Pagespeed are well explained on Webpagetest.Org and Gtmetrix websites.

In your case, the file . HTAACESS, should solve. Creates a file called ". htaaccess" in the main folder of your site with the example code below.

What will happen?

When the browser loads the site, the htaacess file will indicate that some files can be cached for X time.

<IfModule mod_expires.c>
  ExpiresActive on
  ExpiresDefault                          "access plus 1 month"
  ExpiresByType text/xml                  "access plus 0 seconds"
  ExpiresByType application/xml           "access plus 0 seconds"
  ExpiresByType application/json          "access plus 0 seconds"
  ExpiresByType image/x-icon              "access plus 1 week"
  ExpiresByType image/gif                 "access plus 1 month"
  ExpiresByType image/png                 "access plus 1 month"
  ExpiresByType image/jpeg                "access plus 1 month"
  ExpiresByType video/ogg                 "access plus 1 month"
  ExpiresByType audio/ogg                 "access plus 1 month"
  ExpiresByType video/mp4                 "access plus 1 month"
  ExpiresByType video/webm                "access plus 1 month"
  ExpiresByType application/x-font-ttf    "access plus 1 month"
  ExpiresByType font/opentype             "access plus 1 month"
  ExpiresByType application/x-font-woff   "access plus 1 month"
  ExpiresByType image/svg+xml             "access plus 1 month"
  ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
  ExpiresByType text/css                  "access plus 1 year"
  ExpiresByType application/javascript    "access plus 1 year"
</IfModule>
  • hi, it worked in part...only the file still appeared: http://platform-api.sharethis.com/js/sharethis.js (60 minutes) This one still appears, but all the others that appeared in this topic, disappeared, then, the way is the same!! thanks for now!!

  • 1

    This other that appears you have no control because it is not on your server. What you can do is download it, insert it into your project and then it will be served with your setup. Nice that it helped. If it is the best answer, be sure to mark it. Hug.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.