I have a website and when I check page speed with Google plug-in, I receive:
Leverage browser caching The following resources are missing a cache expiration
Where can I change the settings for this?
To leverage your browser's caching generally means that you can specify how long web browsers should keep images, CSS and JS stored locally. That way the user's browser will download less data while navigating through your pages, which will improve the loading speed of your website.
About Leverage Browser Caching Leverage Browser Caching means storing static files of a website in visitor browser. And then retrieving them from browser quickly instead again from server. Actually it uses to speed up each page of a website.
To fix the leverage browser caching warning with WP Rocket, all you have to do is install and activate the plugin. That's it. For more details, see our guide on how to properly install and setup WP Rocket in WordPress. WP Rocket will automatically enable browser caching and modify your .
Edit .htaccess
and append
<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 text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
</IfModule>
This link can help you: http://www.quickonlinetips.com/archives/2010/05/leverage-browser-caching-increase-website-speed/
Leverage Browser Caching
Reduce the load times of pages by storing commonly used files from your website on your visitors browser.
To enable browser caching you need to edit your HTTP headers to set expiry dates on certain types of files.
Find your .htaccess file in the root of your domain, this file is a hidden file but should show up in FTP clients like FileZilla or CORE. You can edit the htaccess file with notepad or any form of basic text editor.
In this file we will set our caching parameters to tell the browser what types of files to cache.
The code below tells browsers what to cache and how long to "remember" it. It should be added to the top of your .htaccess file.
## 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 ##
Recommendations:
Reference: http://websitespeedoptimizations.com/LeverageBrowserCaching.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With