HTTP Caching is available in most browsers and helps make a website more responsive and reduces network bandwidth. In this article, we will understand how to increase or decrease the cache size in modern browsers like Google Chrome, Mozilla Firefox, IE.
Why Increase HTTP Cache Size?
There are a plethora of benefits of using the Browsers HTTP Caching. Caching would be useless if it did not significantly improve performance. Following are a few of the caching benefits.
- Increased Performance
The performance of websites can be significantly improved by reusing previously fetched resources. Web caches reduce latency and enable the content to be loaded quickly. This technique reduces the page load time and hence makes the website more responsive.
- Reduce Network Cost
The goal of HTTP caching is to eliminate the need to send requests in many cases, thereby reducing the network traffic by reducing the number of round-trips. Also, in a certain condition, it can eliminate the need to send full responses and saves network bandwidth.
- Offline Access
In certain instances, the users may experience a disruption in the network or have no network access. In these scenarios, the website may cache the content, thereby allowing the content to be served locally with limited internet connectivity. This works well for sites with static data which don't frequently change, like websites containing documentation.
I make use of local Cached version for the documentation of websites like MSDN, Firefox, Google Developers or blogs while being offline and commuting on the train. The connection is shaky, and I can save some phone data.
How to Increase Http Cache Size in Browsers
Different browsers provide various ways to increase the HTTP Cache size. This document is a step by step guide to increase the Browser Cache in various Browsers (Chrome, Firefox, IE).
Increase Cache Size in Chrome
Currently, the Chrome browser doesn't provide a way to set the Max Size of HTTP Cache in the UI. However, we can add a parameter (disk-cache-size), using the command line.
- Open the Google Chrome Executable properties. Type "Google Chrome" in the Search bar of the Start menu.
- Right-click on the properties of the Google Chrome executable and open the Shortcut tab.
- Add the parameter --disk-cache-size=52428800 The entered size is in MB. So, 52428800 bytes is equivalent to 50 MB.
- Press OK or Apply and launch the Google Chrome.
Increase Cache Size in Mozilla Firefox
- Launch the Firefox.
- Go to Tools -> options.
- Select Privacy and Security options on the left side.
- Scroll down to Cached Web Content section. You would be able to see the current cache size. E.g., on my machine, The text is Your web content cache is currently using 349 MB of disc space.
- Check the Override automatic cache management Checkbox.
- Enter the value in the text box next to “Limit Cache to.” The entered value is calculated as Mb unit.
Increase Cache size in Internet Explorer (IE)
- Launch the internet explorer.
- Go to Tools -> Internet options.
- Next, in General, Tab, Under Browser History, Click Settings button.
- The above step will open a new dialog. On Temporary Internet files tab, select the "Automatically" radio button under the "Check for new version of stored pages".
- Next, set the desired value of the Disk Space to use in the textbox. The entered value is calculated as Mb unit.
- Click Ok and then again Ok/Apply and settings will be saved.
- Close IE and open again.
The above steps show how to change the HTTP Browser Cache Size in Browsers. Increasing the HTTP Cache size will improve the responsiveness and decrease the bandwidth requirement resulting in a good user experience.