Disable Firefox Web Browser Disk Cache When Using Squid Proxy Server

0
215

I use a Firefox-based web browser which connects to a Squid proxy server. The proxy server is part of a much more complicated secure network.

One of the many benefits of using Squid, in addition to the obvious security benefits, is content caching. The cache increases network performance for fetching clients and lowers internet bandwidth.

Firefox web browser also includes its own built-in cache. Two of them, actually! It has a memory cache and a disk cache. You can view the contents of the cache by entering the following into your navigation bar:

about:cache

From here you can also update the cache or view the details of a specific cached item.

The Firefox web browser cache is designed to increase performance. However, when you have caching being performed by Squid, then using the web browser cache is effectively a duplication of services. When the Firefox disk cache and Squid are both actively caching I often found that connections would hang, become unstable or even become non-responsive. This was the result of the Firefox disk cache conflicting with the Squid cache – two caches trying to do the same task.

While choosing one cache over another might not technically be a ‘better’ option, I have found it’s better to leave the task of caching to Squid as it is a dedicated server designated for one specific role. This frees up Firefox resources to concentrate on rendering content rather than juggling finite resources for multiple tasks inside the browser.

There is also an added security benefit to disabling the Firefox disk cache. When enabled, malicious web content can reside inside the cache. Where memory cache is non-persistent and cleared on Firefox close, the disk cache is persistent and if there is malicious content present, it will get reloaded every time Firefox is booted or until you clear the cache entirely.

It’s best to leave the Firefox memory cache enabled to maintain Firefox web browser performance, as the memory cache poses less threat of cache conflict with Squid to that of the disk cache. To disable the disk cache enter the following into your navigation bar:

about:config

Press ENTER to confirm the warning dialog. Now, search for the configuration string:

browser.cache.disk.enable

Set the value to “false“.

Your disk cache is now disabled. We can verify the change by revisiting the about:cache page.

Most of the caching is now be performed by the Squid proxy server, complemented by the Firefox memory cache.

LEAVE A REPLY

Please enter your comment!
Please enter your name here