Browser caching

Browser caching

No matter what browser you use such as Chrome or Firefox, you probably benefit from browser caching. This common practice uses the browser’s ability to store specific parts of the websites you visit for next time. The browser can store images, certain snippets of JavaScript or CSS, and other elements used on the pages. Why does this matter? When you do not have to load everything fresh every time you come to a website, things get faster.

In other words, when you visit a particular site for the first time, it may load a bit more slowly than it will in the future. Then, the browser stores the aforementioned things for next time. When you go back to the same website, those elements already exist so that part of the code that creates the site gets skipped. The less time it takes for the browser to manifest all the code on the page, the faster the load time of the website.

The only parts of a website that can be stored in a browser cache are ones that do not change much over time. If you have ever gone to a site after it was updated but still see the same images or text that is due to your browser cache automatically loading those parts for you. In order to see the new code manifest on your screen, you would need to clear your cache.

From a web developer’s perspective, informing particular browser caches to remember certain parts of the site and forget others each time gives you considerable control over load times affected by this process. Balancing shorter code with caching management makes a difference.

You can control the browser cache using this code that you need to put in the .htaccess file: leverage-browser-caching​.
Click the link if you need help How to add lines to .htaccess file