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. Let’s discuss a WordPress plugin that you can install to perform it. Be sure you have a recent, good backup of your site you can use to restore from if an update or upgrade goes horribly wrong.
Leverage Browser Caching with WordPress Plugin Method, Exabytes recommend W3 Total Cache
- Login to the WordPress dashboard and hover your mouse cursor over Plugins and select the Add New option.
- In the middle of the page towards the right hand side, search for W3 Total Cache and click the Install Now option.
- Once installed, navigate back to the Installed Plugins list and click on the Settings link. Scroll down to the Browser Cache section and ensure browser cache is enabled.
- Now that we have enabled Browser Cache, we need to finish the setup of the W3 Total Cache plugin. On the left side of the dashboard under the Performance section, select the Browser Cache option.
- In the Browser Cache section, under General, click the checkboxes for the following options:
- Set Last-Modified header Set the Last-Modified header to enable 304 Not Modified response.
- Set expires header Set the expires header to encourage browser caching of files.
- Set cache control header Set pragma and cache-control headers to encourage browser caching of files.
- Set entity tag (ETag) Set the ETag header to encourage browser caching of files.
- Set W3 Total Cache header Set this header to assist in identifying optimized files.
- Enable HTTP (gzip) compression Reduce the download time for text-based files.
- Once those options are enabled, select the Save All Settings button and you will be all set!