[实践Ok]How to disable Cache of Chromium (怎样禁用树莓派里的Chromium 浏览器的 Cache)

jackxiang 2015-5-19 23:42 | |
这个没有加上禁用cache,容易出现修改代码chrome不去读取:


/usr/local/scripts/restartChrome.sh


再次对第一个的代码修正:


在那个pi用户下,crontab -e
10秒启动一次:
* * * * * /usr/local/scripts/restartChrome.sh >/dev/null  
* * * * * sleep 10; /usr/local/scripts/restartChrome.sh >/dev/null  
* * * * * sleep 20; /usr/local/scripts/restartChrome.sh >/dev/null  
* * * * * sleep 30; /usr/local/scripts/restartChrome.sh >/dev/null  
* * * * * sleep 40; /usr/local/scripts/restartChrome.sh >/dev/null  
* * * * * sleep 50; /usr/local/scripts/restartChrome.sh >/dev/null  

简介:
Solution of how to disable Cache in Chromimum browser.
转载请注明出处。


There's an option which does not appear in chromium's manual page --- "-disk-cache-dir".
This option specifies where the disk cache should be stored.
Hence, under Linux, we can set the disk-cache-dir to /dev/null. In that way, the cache will be disabled, and all contents will be read from the Internet directly.

Here is what the modified chromium-browser-chromium.desktop looks like:
[Desktop  Entry]
Name=Chromium Type=Application
Comment=Open-source version of Google Chrome web  browser
Exec=chromium-browser %U --disk-cache-dir=/dev/null 2>/dev/null
TryExec=chromium-browser
Icon=chromium-browser
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;  


Why I need to disable file cache?
Well, on my machine, when chromium browser starts up, it keeps reading cache and take a long time to show the homepage.
So I decided to disable it.

来自:http://www.cnblogs.com/yangyingchao/archive/2011/07/30/2178385.html

作者:jackxiang@向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除
地址:https://jackxiang.com/post/8058/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!


最后编辑: jackxiang 编辑于2015-8-16 20:35
评论列表
发表评论

昵称

网址

电邮

打开HTML 打开UBB 打开表情 隐藏 记住我 [登入] [注册]