fbpx
Call us +1-231-421-7160

Leverage Browser Caching - What Does It Mean?

browser-caching.jpg

„Leveraging browser cache” is when a webmaster has instructed web browsers how their resources should be dealt with. To simplify - specifying which elements on your site should be cached and for how long. For example, any content/images on your site that are static and will not be changed or edited frequently (logos, images, etc..) should be set with an expiration time. This can speed up your site and will increase your page speed score along with possibly increasing your SEO ranking.

This rule triggers when you scan your site and the scanner detects that the response from your server does not include caching headers or if the resources are specified to be cached for only a short time.

Keep in mind that an optimized site will rank higher in the search engines and give a better user experience, so it is definitely worth your time to check your site.

Recommendations

Each resource should specify an explicit caching policy that answers the following questions. Can the resource cached and by whom? For how long? And if applicable, how it can be efficiently revalidated when the caching policy expires? The following is an example of this:

## 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 ##

Since we are dealing with Joomla! and Wordpress here at CloudAccess, it’s probably a good idea to use a plugin or extension to assist you with getting your cache settings adjusted properly.

Many of our clients use JCH Optimize Pro which seems to not only set up browser caching but also has the ability to optimize your images, minify your scripts and optimize CSS among other things. There is a version for both Joomla! and Wordpress. You also have the option of manually editing your .htaccess file.

When optimizing your site, keep in mind the following suggestions:

  • Be aggressive with your caching for all static resources
  • Expiry at a minimum of one month (recommended: access plus 1 year)
  • Don’t set your caching more than a year in advance!

To see how your site stacks up - here are a couple of places to start scanning your site.

Google Page Speed Insights
Web Page Speed Test
Pingdom

Overview

Fetching resources over the network is both slow and expensive. The download may require multiple round trips between the client and server, which delays processing and may block the rendering of page content. It also incurs data costs for the visitor. All server responses should specify a caching policy to help the browser determine if and when it can reuse a previously fetched response so that your visitors get the best experience when using your site.

JoomlaDay Poland Summary
What’s 3rd party in my Joomla site?