Is your site is going slow, and you are not able to figure it out why it so.
Below is one of the website report for instance. As you can see Leverage browser caching is in red. And it is not ideal at all. An immediate action has to be performed to get it normal.
If you too got such kind of result and want to fix this error and boost the speed of your website, then read on. This article is definitely for you.
Before solving this issue, it’s good to know how Leverage Browser Caching actually processes with your web browser.
Table of Contents
What is Leverage Browser Caching and how it works
When a webmaster self-defines how the resources of their website should perform on the reader’s browsers. Whether it could be text data, images, scripts, CSS or any which is being served by a web page. This entire process performed by the webmaster is leverage browser caching.
That means while the user visits the web page for the first time. All the unchanged text data, images cached or stored in their web browser.
Doing this the visitor will have better user experience going forward with your website as the website will load much faster. Because the browser doesn’t have to load the entire website every time.
Sounds cool? Let’s us get into action.
Leverage Browser Caching in WordPress via .hta access
The process of browser caching in WordPress without a plugin is also quite easy. All we need to do is, drop a small piece of code in the root file in WordPress i.e .hta access.
Step 1. Login to your Hosting Cpanel.
Step 2. Look for the File Manager and Click on it. This will open all the files of your WordPress website.
Step 3. Navigate to the public_html folder, and find the file named as .hta access from the right pane.
Step 4. Select the .hta access and right-click on it and then select Code Edit. This will open a window, where you can add the code for caching.
Note: It’s wise to take a backup of the .hta access file before doing any changes to it to be on a safer side.
Step 5. Scroll the window containing the code till bottom and paste the below code at the end.
Check the image for better insights., how it should look on your .hta access file.
Step 6. Hit the Save Changes Button.
There you go, you are all done with the setup. And successfully added the leverage browser caching for your website.
Now the visitors will be able to see your site loads much faster than before. For testing the same, you can head over back to GTMetrix. A score of 70+is an ideal for any WordPress website.
You can also achieve a good page loading speed by leverage browser caching using the W3TotalCache plugin.
Also Read: Best Way To Cleanup WordPress Database to (SpeedUp Website)