Acceleration of Firefox and Chrome loading in memory linux when you access a webpage in a browser, apart from the first download of all the page content from the server, when you access the same website, most files are read from the local cache. Therefore, based on this principle, we can place the cache directory of the browser in the tmpfs file system so that it can directly read cached data from the memory and speed up page loading. Www.2cto.com tmpfs is a virtual memory (VM)-based file system. tmpfs is a virtual disk (ramdisk). tmpfs can use both memory and swap ), because tmpfs uses virtual memory, tmpfs files reside in the memory, so reading and writing speed is very fast. By default, the tmpfs file system is enabled in Ubuntu. The mount point is/dev/shm, And the capacity is generally half of the actual memory. However, unlike ramdisk, tmpfs can use swap partitions in addition to RAM. In Linux, it is very easy to put the FireFox and Chrome cache in/dev/shm. You just need to modify the corresponding parameters. The following is the method. -In the address bar of FireFox, enter "about: config" and press Enter. Right-click to create a new String and set "name" to "browser. cache. disk. parent_directory, value:/dev/shm/firefoxbrowser. cache. disk. parent_directory =/dev/shm/firefox
-ChromeChrome is simpler. You only need to add a parameter to the startup shortcut key to-disk-cache-dir = "/dev/shm/chrome. /Opt/google/chrome/google-chrome -- disk-cache-dir = "/dev/shm/chrome/" OK, after you restart FireFox or Chrome, the directory firefox and chrome will be added under/dev/shm. This is their cache directory, and its capacity will increase as the number of websites accessed increases.