Change Google Chrome temporary files folder. Configuring the Google Chrome cache using group policies. Removing connection points

To speed up page loading browser Google Chrome caches their contents: images, js scripts, css styles. All this accumulates on the hard drive and grows in size to hundreds of megabytes, if not more. Therefore, we have already considered and. You can't completely disable caching in Chrome; Google suggests using incognito mode instead.

The Chrome browser is fast, but not always correct. Recently, a bug was discovered that caused extra load on the processor, which increased energy consumption and killed the laptop battery faster. The developers have fixed this problem. But there are other nuances of this browser: when surfing the Internet on HDD Cache files and other data from your user profile are saved almost every few seconds. This does not have the best effect on the durability of SSD drives, and traditional HDD drives tend to buzz and work slowly when constantly recording.

To correct this shortcoming, you can transfer the browser cache or the entire user folder in RAM to a virtual disk, for which it is advisable to have a laptop with at least 4 GB of RAM. Access speed random access memory far exceeds the speed of accessing a hard drive, so in theory you can kill two birds with one stone: speed up the browser and extend the life of the HDD or SSD. So let's get started.

Download the program RAMDisk(you can from the official website, that’s enough free version RAMDisk Lite).

Install RAMDisk and launch it in the Start menu folder of the same name RAMDisk Configuration Utility. Select advanced mode ( View - Advanced)

In the main window Settings in line Disk Size set the desired size virtual disk: It’s important to find a middle ground here; you don’t need to specify 100 MB or 2 GB. Here we choose file system FAT32 Partition and type Windows Boot Sector. Press the button Start RAMDisk and wait for the launch to complete.

After that, go to the tab Load/Save and check the boxes for Load Disk Image at Startup And Save Disk Image at Shutdowm. This means that when the computer is turned off, the image of our created virtual disk from RAM will be saved on the hard drive, and when the computer is turned on, it will be loaded back into RAM without losing data.

Select from the top menu File And Save Settings to save settings. Then stop the virtual disk with the button Stop RAMDisk and after a few seconds launch it again with the button Start RAMDisk, thereby rebooting the disk.


Half the work is done. Now you need to inform Chrome about its new cache storage location. To do this, some advise opening Shortcut properties browser and in line An object add with a space --disk-cache-dir="H:\Cache"(here H:\Cache is the created virtual disk in RAM). This method can be used if, for example, you launch the browser every time through a shortcut on the desktop. If the program opens in another way, for example, automatically when inserting a 3G modem into the laptop, then the Chrome exe will load without the specified parameters for the shortcut.

In order not to limit yourself to half measures and to do everything humanly, you can deceive Chrome by creating a link. For this we need free utility Link Shell Extension(can be downloaded from the developers' page).

Download, install and launch Link Shell Extension; the utility also has a Russian language. We do not need the program window itself. The program added what was needed to the right-click context menu.

Opening My computer and going to the created virtual disk, we created it as Local drive H.

On this disk create a folder Cache and click on it right click mice. In the opened context menu choose Remember link source.

Then we go to the directory:
c:\Users\YOUR_USERNAME\AppData\Local\Google\Chrome\User Data\Default\

Since the AppData folder is usually hidden, you can open Start - Run and paste the following path for quick navigation:
%userprofile%\local settings\application data\google\chrome\user data\default\

Here, with the browser closed, delete the folder Cache, then right-click and select Place as - Symbolic link, thereby inserting a shortcut. Thus, Chrome will access the Cache folder in its usual path and not suspect that it is actually located in RAM. At the same time, it is still necessary to periodically perform, without allowing its volume to increase beyond the size of the virtual disk in RAM.

If desired, you can do the same not only for the cache folder, but for the entire folder User Data, which includes Cache. Thus, you can move all your user data that Chrome works with into RAM: history, cookies, extension data, etc.

When a user opens a website in a browser, the data from remote server are transmitted to his computer, and part of this data is stored in a special local storage called cache. This approach allows Internet pages to load faster when you visit the site again, but it also has its drawback.


If the storage of cached files is not periodically cleared, then pretty soon it will take up a decent amount of space on the disk. This is especially true since the cache of all browsers is located in the system partition, for which relatively little space is usually allocated.

Therefore, to free up disk space C extra space, the browser cache should be moved somewhere else. For example, to another logical or physical drive. However, you may have other reasons for moving the cache, it doesn’t matter, the main thing is to figure out how to do it correctly. This is exactly what we will do. Let's start with the most popular browser, as is generally considered. Google Chrome.

Transferring Google Chrome Cache

If you have Chrome open, close it and then copy and paste into address bar Explore this path:

%userprofile%/local settings/application data/google/chrome

In the directory that opens you will see a folder. This is where the Chrome cache is stored.

Copy it to any location convenient for you. Now go to the desktop and open the properties of the Chrome shortcut. In the field at the end of the path already there, add a parameter separated by a space —user-data-dir=”D:/User Data” and save the result.

As you already understood, this is the new path to the transferred cache folder. Now you can launch the browser. From now on it will access the cache from this folder.

Note: Please note that the new cache address will only be accessed when Chrome is launched via edited shortcut.

Mozilla Firefox Cache Transfer

Moving the cache to Firefox is a little more complicated. First, go to the profile directory, for which we enter the line in the address bar of Explorer %appdata%/Mozilla/Firefox/Profiles and press enter. In the profile park you will see a folder named xxxxxxx.default, where the line of icos is the profile’s own name. You will have your own, only the extension will remain unchanged default.

We copy it to the right place, and then go to Explorer again, but at the address %appdata%/Mozilla/Firefox/profiles.ini . This will open a configuration file in Notepad profiles.ini. The bottom line contains the path to the default profile, which looks like this:

Path=Profiles/ xxxxxxx.default

We change it to the new path along which we moved the directory with the cache:

Path=D:/xxxxxxx.default

At the same time, make sure that the parameter has a value 0 . If yours is different, correct it so that it looks like the screenshot.

Launch your browser and open the hidden settings page by going to . Right-click on an empty space and select the option from the menu New -> String.

Give the new parameter a name browser.cache.disk.parent_directory, and as its value paste the new path to the profile folder copied earlier.

Restart Firefox and it will start working from the new folder.

Opera Cache Transfer

Moving the Opera cache is almost no different from what we did during the transfer Google cache Chrome. Using the method described above, go to the directory at %userprofile%/AppData/Local/Opera Software/Opera Stable and copy the folder to a new location Cache.

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

  • --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 cache Google browser Chrome. 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 old folder cache.

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 :)

How can I transfer my browser data to another location on my computer? Even if the browser is initially installed on another drive, for example, D or E, it will still hidden folder user profile on drive C “AppData” (in modern Windows versions) web browser profile data will be placed - cache, history, cookies, settings, extensions, etc. Many browsers provide the ability to move their cache from system disk From to another disk - another partition or another device. True, this feature cannot be found as a convenient, eye-catching option in the browser menu. The function for changing the cache storage path is usually located in hidden settings web browsers. In this article we will not delve into the specifics of changing the cache path for each browser. Let's do it simpler - consider universal method moving web browser cache to another location. But we will transfer not only the cache, but entire browser profiles. And a small program called Junction Link Magic will help us with this.

1. Why move your browser profile to another location on your computer?

The need to transfer cache and other frequently overwritten browser data in rare cases may be caused by the approaching SSD MTBF. More often, the transfer of certain system files and third-party software is carried out either to the HDD due to the fact that the 64 GB SSD runs out of space, or to a RAM disk - a productive disk created due to excess RAM and sold in Windows system special type of programs. Transferring the cache and other browser data to a RAM disk can significantly speed up your work with the Internet, since the speed of reading and writing small files from RAM is several thousand times faster than from a HDD.

But RAM disk can only solve the problem of slow speed HDD operation. A RAM disk does not solve either the problem with a weak processor or the problem with a slow Internet connection. To understand whether the browser has an effect in conjunction with a RAM disk, it is not necessary to immediately begin transferring the profile. Their interaction can be tested by placing a portable version of any of the browsers on a RAM disk. If the effect is obvious, you can then begin transferring the browser profiles installed on the Windows system to the RAM disk.

2. About Junction Link Magic

Next, we create connection points one by one and transfer the contents of each of the “Mozilla” folders as part of “AppData” to the destination disk, as this process is described in the previous paragraph of the article for Google profile Chrome.

We do the same with Opera browser. The latter creates two of its own “Opera Software” folders inside the “AppData” folder – inside “Local” and inside “Roaming”.

6. Removing connection points

If the expected result from optimizing Windows due to the operation of the RAM disk was not justified in practice, you can return all the settings made to the system, in particular, transferred browser profiles, by rolling back to a restore point or backup copy. This method will solve several previously performed settings transfer operations in one action. If the system is stable and you only need to return the transferred browser profile, the Junction Link Magic program provides the ability to delete connection points. The required connection point may not be displayed in the program window; in this case, you need to scan the system. Click “Scan now!”

As soon as the desired connection point is displayed in the Junction Link Magic window, we can cancel further scanning and delete this point.

Confirm deleting the connection point.

After deleting the point, the browser folder contained in “AppData” will turn into a regular folder, where you need to place its contents, cutting it out from the corresponding folder on the destination disk.

One day, about a year ago, I got a computer that I could take with me to the sofa - a laptop, that is. The laptop was chosen purely for work; one of the requirements when choosing was good performance. Intel processor Core i3 seemed sufficient in terms of performance.

But, at first, the fast laptop began to irritate me more and more with its slowness. It’s not that it was stupid, froze, or the like - no, it just worked evenly slowly. This was especially noticeable if you worked on a “full-size” computer with a fast hard drive, and then switched to a laptop. The reason for this was the laptop's slow hard drive. Moreover, this is not a problem specifically for my laptop, this is a problem for all laptops, because they have slow hard drives with a rotation speed of 5400 rpm.

One day this got to me and I decided to buy an SSD. Moreover, the fastest one was chosen. Having analyzed busy place on drive C: and finances, it was decided to take a 64 GB SSD. And considering that with a small volume, the speed of most solid-state drives drops proportionally with decreasing capacity, the range of selected models quickly narrowed. The choice fell on Samsung 830.

But how to insert an SSD into a laptop that does not have room for a second hard drive? I immediately rejected the option of completely replacing the HDD with an SSD. A quick google led to the fact that there are still ways to install an SSD instead of the now unnecessary DVD. I was not the first with such questions, and quickly found that I needed some kind of adapter into which the hard drive fits and is inserted instead of the drive. Found on ebay.com required adapter. The lot was called “Universal 9.5mm 2.5” SATA 2nd HDD Hard Driver Caddy For CD DVD Optical Bay.” It cost a little more than eight dollars.

After almost a month of waiting, the newly purchased SSD was inserted into the adapter, and the adapter was already in the laptop. Of course, the adapter cover is not exactly like the original drive, it turned out not completely invisible, but quite tolerable.
The newfangled Windows 8 was installed on the brand new hard drive, everything flew and I was just fabulously glad that my laptop had found almost a second life. My joy knew no bounds until I launched programs to monitor the remaining life of the SSD. In particular, SSD program Ready predicted the rest of the life of my SSD in six months. This was somehow not at all pleasing. I started reading and thinking about why this is so.

It turned out that everything was simple - the main load on the hard drive was... Google Chrome! I would never have thought that a monster from a huge corporation would harm my hard drive so much.
Chrome is constantly writing something to the cache. Almost continuously. Here every 2 seconds
c:\Users\User\AppData\Local\Google\Chrome\User Data\Default\Cache\
There is also a folder where the cache of the online video you are watching is written. This folder is called Media Cache
And they also write icons, history and all that. In the end, I came to the conclusion that the User Data folder is simply constantly changing, writing and reading files and killing my SSD.

A quick analysis of the Internet made it clear that this does not cause any inconvenience to Chrome engineers, since Chrome has practically no settings for this part. The settings can be forced by adding a parameter to the shortcut, and then you must launch Chrome through this shortcut, otherwise it will start without parameters. The fire fox has the same dances with a tambourine. But with Opera everything is simpler - I set it in the settings without cache, and that’s it.

It was decided to disable this damned Chrome cache so that it would not write anything to the disk at all. Add the parameter “--disk-cache-size=1 --media-cache-size=1” to the Google Chrome launch shortcut. And lo and behold! The cache is not written, and the browser... does not fly and works quite poorly. It’s especially noticeable when you open Chrome with 30 open tabs, when it loads everything again. Well, we didn’t get rid of the records completely either - something like icons and history was still written to the disk.

The second solution to the problem was to transfer the folder with the User Data chrome profile settings to the HDD. This, of course, would solve all the problems, but the question is why did I buy an SSD?

The next option, in my humble opinion, solved all my problems. I decided to use RAM Drive - i.e. keep everything in RAM, and only write to the hard drive when turned off. Considering that my laptop is either turned on or in standby mode, it will very rarely be written when turned off. Of the programs I liked, I chose Qsoft RAMDisk. Installed as a driver. In the properties I selected the disk size, file system, where to write when shutting down. I allocated 512 MB for the disk (I think a reasonable minimum of 128 MB).

It was possible to simply transfer the cache folder, or to add the Media Cache folder to it, but I decided to completely get rid of all kinds of entries and transfer the entire User Data folder.

Again, it was possible to specify --user-data-dir=“path to ram disk” in the shortcut parameters to redirect the profile storage, it could be registered in the registry, but if launched without a shortcut or updated, all this would not work. I started thinking about how to do it so that I could redirect it without changing anything. And then I remembered about symbolic links!

The Link Shell Extension utility was downloaded, with the help of which I actually created a “shortcut” in place of the User Data folder, a link that led to my RAM disk. Those. There was nothing on the disk, so when we went into the User Data folder we were immediately redirected to the ram disk. Moreover, what is the advantage of such a solution - neither the system nor Chrome saw any catch.

Chrome started working even faster than it did on the SSD. Very fast. Now I’ll probably even recommend to everyone to at least put the chrome cache on a small RAM disk. Personally, it’s a mystery to me why engineers don’t pay attention to the problem that chrome writes a lot and often. Reliability of information is good, but not at the cost of killing the hard drive!

As a result of the manipulations done, my chrome flies around and writes all its nasty things to the RAM. The SSD is happy and enjoys a long remaining life.