Why Browser Caching?
HTTP caching allows the browsers or proxies to store these less changing resources locally and then it can refer to the locally cached copy instead of downloading it again on loading a different page of the website. Enabling cache not only helps in loading the website faster, but also helps in saving Bandwidth and Hosting cost of the website. Setting an expiry date or a maximum age in the HTTP headers for static resources instructs the browser to load previously downloaded resources from local disk rather than over the network.
How to leverage browser caching
In order to do this, we need to modify our
.htaccess file and add in the appropriate directives.
You can access your
.htaccess file through cPanel by clicking on the File Manager. When the popup box appears, click on the Web Root option and make sure that the “Show hidden files” option is checked.
Directives to Leverage Browser Caching:
.htaccess file, paste in the following set of Directives at the top of the file to enable Brower Caching:
Now save your file and see the difference. Your subsequent page loads will show a great boost.
Get weekly updates via email!
Thank you for subscribing.
Something went wrong.