Moving Browser Cache Folder in IE, Firefox, Chrome, Opera, and Safari

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.

Internet Explorer:

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

Mozilla Zine: Browser.cache.disk.parent directory


The only way to change location of the cache folder is through the command prompt arguments (UPDATED):

C:\…\Application\chrome.exe --user-data-dir=d:\Temp\Chrome
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 switches Surprisingly, source code seems to be the only official documentation from Google. A brief blog post on the same topic:

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.

Even though Chrome has configuration page similar to FireFox (type about:flags in the browser URL), it does not allow changing its cache configuration.

How to Turn On/ Disable GPU Hardware Acceleration on Google Chrome.


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

Opera’s Settings File Explained

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.

about URI scheme

8 thoughts on “Moving Browser Cache Folder in IE, Firefox, Chrome, Opera, and Safari”

  1. Nice to have this all in one place — thanks. FYI, looks like Chrome may have changed the switch, and your site has reformatted the dashes and quotes for that one. Try i.e. –user-data-dir=”D:\Temp\Chrome” now. (Starts with two dashes and quotes should be regular non-curly quotes.) Also maybe worth noting that the Save button for Opera is at the bottom of the expanded “User Prefs” group — not at the top or bottom of the page where you might think to look first.

  2. Excellent and simple explanations. Thanks for the great post. I have found it very useful to move the temporary files to a RAM Disk, improving performance and saving SSD from lots of writing/reading cycles.


  3. Well written and simple ! good work ! same goes to the few comments, very constructive ! … I also for a long time move all temp to a diff drive, I also do the same with the pagefile , leaving only 256 MB on sys drive. and now with ramdrive , I put the pagefile on ramdrive as well, knowing windows always put some stuff in there even when ram not full…speed gain !

Leave a Reply

Your email address will not be published. Required fields are marked *