Speeding up Firefox - transferring the profile and cache to the ramdisk. Configuring the Google Chrome cache using group policies How to change the storage location of the Yandex browser cache

If you, like most other people, spend a lot of time on the Internet, willy-nilly you have to learn some tricks, get around various tricks, that is, perform various actions aimed at optimizing your work on the network.

One such trick is moving the firefox cache. There may be a variety of prerequisites for this: for example, to optimize free space. In addition, the cache can be transferred to the hard drive to extend the life of the SSD. In general, there are quite a few reasons, and if you have a desire or need to transfer the cache in the Mozilla browser, I will tell you how.

How to transfer cache

To migrate the firefox cache, you need to do the following:

  • First, close your Mozilla web browser;
  • Now we need to get into control of the computer. To do this, go to the start menu, and then click on the “Run” line. An alternative option is to use the key combination +[R];
  • A window appears in which you need to enter “%appdata%\Mozilla\Firefox\Profiles” (without quotes), and then click ;
  • a directory with a name called [name].default has opened, which is actually your profile folder in this web browser. You need to copy it to where you would like it to be;
  • open computer management again (remember, with the +[R] combination), but now in the window that appears you need to enter “%appdata%\Mozilla\Firefox\profiles.ini” (without quotes), then – ;
  • after these steps “profiles.ini”, where you need to specify the path where you moved your cache. Externally, everything should look like in the screenshot below.

"Explanations" for the browser

Now you need to “notify” your computer that you have moved the cache to another location.

Moving the Firefox cache to another drive is done for security reasons, increasing the level of privacy of user data stored in the browser, and also due to lack of free space on the system partition. This procedure is simple, but requires attention from the user; especially when entering data.

This article will show you step by step how to move the cache to another disk or partition, as well as to a virtual RAMDisk.

Moving the cache to another directory

1. Close your browser.

2. Press the combination “Win ​​+ R” on the keyboard.

3. In the Run window, paste - %appdata%\Mozilla\Firefox\Profiles.

And then click OK or press Enter.

4. Copy the folder: right-click → Copy. And then paste it into the directory where you want to store the cache.

Note. FF profile name is generated automatically. It looks like - xxxx.default.

Editing the INI File

Now you need to register the path and also change some parameters.

1. Launch the Run panel. Enter - %appdata%\Mozilla\Firefox\profiles.ini.

2. Click "OK".

3. The contents of the file will be displayed.

4. In the “Path” line after equal, remove the parameter and write the path to the profile.

For example: Path=H:\3euii4eo.default

5. Set IsRelative to "0".

6. Save changes. In File, click Save.

Adding an entry to add-ons

1. Launch FF. Enter the address - about:config. Press "Enter".

2. Under the notification text, click “I accept... the risk!”.

3. Right-click on an empty space on the tab.

4. In the menu, go to: New → String.

5. In the “New Value” panel, type - browser.cache.disk.parent_directory
Click "OK".

6. In the next panel, specify the exact path -
H:\\xxxxxxxx.default

7. Click "OK". The created add-in should appear in the list, in the tab.

Transfer to RAMDisk

The procedure for moving a cache to a virtual RAMdisk is the same as to a physical disk. But first you need to create a RAM disk. You can perform this operation as follows:

1. Download the RAMDisk Software utility from the offsite and install it on the system.

2. Launch. Set the parameters in it - View, Advanced.

3. In the Settings section, set the virtual media size. And also check the boxes next to the Windows Boot Sector and Fat32 options.

4. Click "Start".

5. Upon completion of the operation, set the settings for loading/saving data in the Load/Save section. It is recommended to enable both options so that the disk image is automatically created before the PC is turned off and loaded automatically when it is turned on.

If something goes wrong - the browser will not start, the cache will not be saved - check whether all parameters are specified correctly (path to the folder, entry in the configuration, variable value in the profile.ini file).

Good day, dear friends, readers, visitors and other individuals.

Today we will talk about such a useful thing as transferring the browser cache to another drive. Why might this be necessary? Well, for example: in order to optimize (in case of transferring it, say, to or to an SSD) the work of these same browsers, or in order to save valuable space on your hard drive (for example, if somehow mythically you don’t have enough space on your hard drive ), or maybe to extend the lifespan, which we wrote about in a very recent article..

In general, I think that everyone will find their own practical application for this issue, but for now we will simply share a tool for making this a reality. Moreover, we will touch almost all adequate modern browsers, which means that almost no one will be offended.

Let's get started.

Mozilla FireFox Browser Cache Transfer

Let's start with my favorite, namely the FF browser. Personally, I transferred its profile + cache (and the distribution itself) to a RAM disk, which I advise you to do.
Actually, here is the sequence of actions we get:


With changes within the system, that’s probably all. Now we need to explain to the browser that we have moved its profile and cache to another location.

In a nutshell, something like this. Let's move on to other browsers.

Transferring Google Chrome Browser Cache

It is performed almost similarly to transferring a FireFox profile, only a little faster and easier:


As you can see, actually, nothing complicated.
Well, for a snack, let's talk about the red browser.

Transfer cache and profile of Opera browser

For the “red” browser, everything is similar to the transfer of Google Chrome:


That's all for now. Just like that, simple and fast.

Afterword.

These are the pies. I hope that this information was useful to you.
Well, as was said at the beginning of the article, I think everyone will find a use for themselves.

As always, if you have any questions, additions, etc., please leave them in the comments to this post.

PS: The default cache storage paths may change in different versions of the program
PS2: Transferring the cache by assigning a parameter to a shortcut only works when launched through this shortcut, and in other cases the default path is used (

To manage the cache in Chrome, only a few options are officially available, and they are arguments to be launched from the command line (the easiest to implement, but not the most convenient to use method):

  • --disk-cache-dir=<путь к папке>: cache location
  • --disk-cache-size=<размер в байтах>: cache size
  • --user-data-dir=<путь к папке>: folder of all user data (profiles, cache, ...)

Actually, all you need is to launch Google Chrome with the correct parameters. All of the following applies equally to Chromium.

Windows

In Windiws 7, Chrome by default stores the cache somewhere in the area C:\Users\username\AppData\Local\Google\Chrome\User Data\Default\Cache . (For other OS see)

To change the cache location permanently, the following steps are required:

Step 1. Change the shortcut

RMB by shortcut ⇒ "Properties"⇒ tab "Label"

  1. Create a folder somewhere for the future cache.
    For example, at "D:\temp\Google_Chrome"
  2. In field "An object", separated by a space, add the full path to this folder as a parameter:
    --disk-cache-dir="D:\temp\Google_Chrome"

Now the address "D:\temp\Google_Chrome" will be stored Google Chrome browser cache. After restarting Chrome, folders will appear in it Cache, Media Cache etc.

To limit the cache size, for example, to 300MB, add another parameter separated by a space:

Disk-cache-size=314572800
(300 * 1024 * 1024 = 314572800 bytes)

If you want to get rid of the cache completely, set its size to 1 :)

But: If Chrome is the default browser, then when launched from third-party applications, it will still launch with default settings. Therefore, let's move on to step two.

Step 2. Edit the registry


The final command to run in the registry will look something like "C:\Users\Martin\AppData\Local\Google\Chrome\Application\chrome.exe" --disk-cache-dir="D:\temp\Google_Chrome" --disk-cache-size=314572800 -- "%1" (for Win7).

Step 3. Alternative 1

Alternatively, you can not edit shortcuts/registries, but simply place a symbolic link to the desired location instead of the old cache folder.

Step 3. Alternative 2

Also, instead of editing launch parameters, you can use Politicians:

  1. Open the Registry Editor.
  2. Go to the key HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Chromium and add Dword DiskCacheSize (RMB on Chromium ⇒ newDword (32-bit value)).
    Set the cache size in bytes.
  3. To set the cache folder, create String named DiskCacheDir and set the value to be the full path to the required folder.

Linux

Everything is similar to the situation with Windows shortcuts. It is worth correcting the alias for launching Chrome so that it is called with the necessary parameters.

An interesting usecase is storing a cache in RAM (tmpfs):
$ google-chrome --disk-cache-dir=/tmp/cache

Take a look at the arch linux page about Chromium to find out more interesting things :)

If you have an SSD drive and want to save space on it, there are many different ways to do it. One option is to transfer the browser cache to your hard drive. This is due to the fact that any browser constantly records and deletes temporary files during operation, which can significantly affect the free space on the disk. Also, you can look at the article on how to disable the built-in .

So, for different browsers in order.

Google Chrome and all browsers based on the Chromium engine

The method is suitable for browsers CoolNovo, RockMelt, Rambler Nichrome, Yandex.Browser, [email protected], as well as for Opera above version 15.

In order to change the cache storage path, you need to slightly edit the shortcut from which you launch your Chrome.
To do this, right-click on the shortcut and click “Properties”. In the “Object” cell you need to add the following:

Disk-cache-dir="path"

After .exe and after a space!

In return<путь>write the desired address, it should look something like this:

By default, the cache is stored in the following folder:

C:\Users\username\AppData\Local\Google\Chrome\User Data\Default\Cache\

It must be removed manually. This method will only work when launched from the shortcut in which you added this parameter.

Mozilla Firefox

In order to change the cache location in Firefox, you need to go to the hidden browser settings. To do this, enter the following into the Firefox address bar:

About:config

press Enter; If the window displays, then we agree to “void the warranty.”

Right-click on the “setting name” and select New > String from the drop-down menu

1) Enter a parameter to change the path of the main cache folder:

Browser.cache.disk.parent_directory

and enter the value of the desired folder, for example: D:\cache\Firefox\

2) Enter a parameter to change the path of the Firefox offline cache:

Browser.cache.offline.parent_directory

And we specify the same path as in the first parameter.

Firefox will create a Cache folder in this folder and store cached files in it. The folder with the old cache must be deleted manually. In Windows 7, by default it is located:

C:\Users\<имя_пользователя>\AppData\Local\Mozilla\Firefox\Profiles\*****.default\

Opera

Following the example of Firefox, we need to go into the deep settings of the browser. To do this, also type in the address bar:

In the list that opens we look for:

And there we choose:

The default is the path to the cache.