Browser caching can help by storing files locally on the user’s browser. When visiting the website for the first time, it will take the same time as usual to load, however, when that same user revisits the site, refreshes, or even goes to a different page of your site, they will already have some of the files stored locally. This means that the user’s browser has to download fewer data and make fewer requests to the server, thus resulting in decreased page load times.
What you’ll need
Before you begin this guide you’ll need the following:
- Access to
Step 1 — Editing The .htaccess File
The process is really simple, the following code needs to be added to your
.htaccess file (a guide on how to locate your
.htaccess file can be found here):
Once the changes are saved, browser caching will be enabled for your website.
Step 2 — Testing Browser Caching
Here are the results BEFORE adding browser caching:
For comparison, here are the results AFTER adding browser caching:
In this short guide, we have learned how to increase the performance of your website by enabling browser caching.