Leverage Browser Caching

1

I have tried several online page optimization tests and one of them gives me this error that I do not know how to solve ...

Leverage Browser Caching

I do not know what this is and how to solve it, honestly.

--------------------------------------

Would anyone know how to solve this problem?

Many thanks in advance!

    
asked by Charlie Clewer 14.11.2017 в 19:55
source

1 answer

0

Solution to Leverage Browser Caching

I have been looking more closely and I have found this post that explains the problem that Leverage Browser Caching entails. link

The solution, or rather a possible solution, is to define the storage time in the file types cache in the .htaccess file.

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

And developing more the answer, we could define, or that I have understood, that it is necessary to specify to the navigator how often it should store the files in the browser's cache, since otherwise every time you visit the page you will return to download all files, so the page load time increases and the page is not optimized, which hurts in SEO.

Therefore, by specifying it in the .htaccess file, we tell the browser that every X time it downloads the file types and stores them in the cache.

I hope it was a little clearer. For more information about it, or rather, for "truthful" information, visit the link I have put above.

Greetings!

    
answered by 15.11.2017 / 16:28
source