Using browser caching

I have a website, and when I check the page speed using the Google plugin, I get:

Use browser caching. The following resources do not have a cache expiration date.

Where can I change the settings for this?

+5
source share
2 answers

Edit .htaccessand add

<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 may help you: http://www.quickonlinetips.com/archives/2010/05/leverage-browser-caching-increase-website-speed/

+15
source

Use browser caching

Reduce page loading time by saving public files from your site to your browser.

, HTTP-, .

.htaccess , , FTP-, FileZilla CORE. htaccess .

, , .

, "" . .htaccess.

## EXPIRES CACHING ##
&lt;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"
&lt;IfModule>
## EXPIRES CACHING ##

:

  • .

: http://websitespeedoptimizations.com/LeverageBrowserCaching.aspx

+2

All Articles