Having recently replaced OS partition hard-drives with solid-state drives on my desktop and two laptops, I decided to tweak a few settings on my Windows in order to reduce the number of unnecessary write operations to SSD. Amongst the candidates for the move from more expensive SSD space to spinning hard-drives, I selected temporary Windows folder and browsers cache folders. Moving temporary Windows folder turned out to be one step operation – changing Environment variables in Computer – Advanced system settings dialog.
However, after this quick success moving my browsers cache away from SSD turned out to be not the most trivial task due to a large number of different browsers and their very different approach to storing configuration settings. Here is my experience and instructions on how to do it in various browsers.
IE offers the easiest and most convenient way to change a new folder for cache.
Tools – Internet Options – under ‘Browsing History’ section choose ‘Settings’
Click ‘Move folder…’ and provide the new location, e.g. d:\Temp\IE
Heads up: After providing a new temp folder and clicking OK to save new settings, IE/Windows forcefully closes current user session, and logs the user off.
In the URL type: about:config
Create a new string preference: browser.cache.disk.parent_directory
and specify a path to your cache folder, e.g.: d:\Temp\Firefox
The only way to change location of the cache folder is through the command prompt arguments (UPDATED):
Chrome deprecated previous disk-cache-dir command, and the only way to move cache folder is to do it along with the rest of profile information. Reference: User Data Directory.
C:\…\Application\chrome.exe --disk-cache-dir=”d:\Temp\Chrome” --disk-cache-size=75000000
Where --disk-cache-dir points to your custom cache folder, and –disk-cache-size specifies the maximum cache size in bytes.
Here is a full list of Chrome’s command line switcheshttp://src.chromium.org/svn/trunk/src/chrome/common/chrome_switches.cc. Surprisingly, source code seems to be the only official documentation from Google. A brief blog post on the same topic: http://peter.sh/experiments/chromium-command-line-switches/.
Another useful command for Chrome, which reduces its memory footprint: --process-per-site. This command allows Chrome to run tabs from the same domain in the same process, thus reducing number of spun out processes and memory use, while still offering process isolation. http://www.chromium.org/developers/design-documents/process-models.
Even though Chrome has configuration page similar to FireFox (type about:flags in the browser URL), it does not allow changing its cache configuration.
Review the location of the current cache folder by typing in the URL:
opera:about or from Menu – Help – About Opera.
To modify the settings type the URL: opera:config
Navigate to “User Prefs” tab and modify its cache folder: Cache Directory4 =d:\Temp\Opera\
(alternative quick jump link: opera:config#UserPrefs|CacheDirectory4)
Additionally you can modify temporary download folder for Opera as well, through another key:
Temporary Download Directory = d:\Temp\Opera
UPDATE: The latest versions of Opera do not provide that user input functionality, but instead you have to use command line parameter: –disk-cache-dir=d:\path
Safari unfortunately does not allow changing the location of its cache directory, just like it does not allow changing any of its advanced settings in a comprehensive way.