an9wer's

Firefox Cache in RAM

posted:

2025-05-13

HTTP is designed to cache objects - such as html pages, jpeg images, css stylesheets, and etc. - as much as possible [1], because that way it not only reduces the load on the server, but also saves bandwidth for users of the HTTP service. However, it is estimated that only a fraction of cached objects will be reused, usually about 30%, because of very short object expiration time, updates or simply user behavior (loading new pages instead of returning to the ones already visited) [2].

In Firefox (the web browser of my choice), cached objects can be stored either in memory or on disk. Disk caching results in frequent disk writes, which could reduce the lifespan of disks, especially for SSDs (solid-state drives). Memory caching, on the other hand, provides superior speed and enables unlimited read/write cycles. Therefore, memory caching would be a better choice.

To configure Firefox to cache in memory only (with disk caching disabled), open the page about:config:

After that, open the page about:cache to check if the new settings are in effect - it should be something like this:

Firefox cache storage

Thanks for reading :)

Further Readings