uExclusive

Leverage Browser Caching for Images, CSS and JS

This is a common issue that when addressed can significantly improve your website/web page load time on your visitors' browsers.

To leverage browser caching generally means that you specify how long Internet browsers keep images, CSS (cascading style sheets) and JS (javascript) stored locally on your visitors' browser/computer. This determines how often their browser will download  data while navigating through your pages.

To enable leverage browser caching, add these lines to your .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 ##

The .htaccess file can be modified via FTP (file transfer protocol), or the File Manager in cPanel.

WordPress Plugins

The cache managing plugin I like is Autoptimize by https://www.optimizingmatters.com is my most recent choice. Other good optimization plugins are WP Super Cache, HyperCache, Comet Cache or KeyCDN’s Cache Enabler.

Connect on LinkedIn
Follow @uExclusive on Twitter
Follow on Facebook
Follow on Instagram
Listen to podcast
Watch videos
crossmenu linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram