2017年11月9日 星期四

[Ubuntu] 加速瀏覽器 firefox & chrome,將cache暫存,指到記憶體

瀏覽數
如果使用SSD硬碟,此作法可以減少硬碟的讀寫率。

Firefox:
網址列輸入 about:config [Enter]
搜尋名稱 browser.cache.disk.parent_directory
將值設定為 /dev/shm/firefox
重開瀏覽器,即可生效。



Chrome:
變更 google-chrome cache路徑:
cache的位置在自己的家目錄底下$HOME/.cache/google-chrome,建立一個軟連結到 /dev/shm/ 即可。
輸入指令:
mkdir /dev/shm/google-chrome
rm -rf $HOME/.cache/google-chrome && ln -s /dev/shm/google-chrome $HOME/.cache/google-chrome

立即生效。
設定開機時自動建立目錄
sudo vi /etc/rc.local
加入下面一行指令於exit 0之前
mkdir /dev/shm/google-chrome && chmod 777 /dev/shm/google-chrome
exit 0

沒有留言: