<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://www.jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://www.jackxiang.com/post//</link>
<title><![CDATA[[实践Ok]How to disable Cache of Chromium （怎样禁用树莓派里的Chromium 浏览器的 Cache)]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[WEB2.0]]></category>
<pubDate>Tue, 19 May 2015 15:42:46 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	这个没有加上禁用cache，容易出现修改代码chrome不去读取：<br/><textarea name="code" class="C" rows="15" cols="100">
#!/bin/bash
export DISPLAY=:0.0
PROCESS_NUM=`ps -ef &#124; grep &quot;chromium-sandbox&quot; &#124; grep -v &quot;grep&quot; &#124; wc -l`
if [ $PROCESS_NUM -eq 0 ]; 
then 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;chromium-browser --kiosk&nbsp;&nbsp;&quot;http://192.168.2.2/&quot;
fi

</textarea><br/><br/>/usr/local/scripts/restartChrome.sh<br/><textarea name="code" class="php" rows="15" cols="100">
#!/bin/sh
export DISPLAY=:0.0
ps -fe&#124;grep chromium&#124;grep -v grep
if [ $? -ne 0 ]
then
chromium-browser --kiosk --disk-cache-dir=/dev/null&nbsp;&nbsp;&quot;http://localhost/index.html?name=jack&amp;rand=&#123;$RANDOM&#125;&quot;
echo &quot;start process.....&quot;
else
echo &quot;runing.....&quot;
fi
#####
</textarea><br/><br/>再次对第一个的代码修正：<br/><textarea name="code" class="php" rows="15" cols="100">#!/bin/bash
export DISPLAY=:0.0
PROCESS_NUM=`ps -ef &#124; grep &quot;chromium-sandbox&quot; &#124; grep -v &quot;grep&quot; &#124; wc -l`
if [ $PROCESS_NUM -eq 0 ];
then
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;chromium-browser --kiosk --disk-cache-dir=/dev/null &quot;http://192.168.2.2?rand=&#123;$RANDOM&#125;&quot;
fi</textarea><br/><br/>在那个pi用户下，crontab -e<br/>10秒启动一次：<br/>* * * * * /usr/local/scripts/restartChrome.sh &gt;/dev/null&nbsp;&nbsp;<br/>* * * * * sleep 10; /usr/local/scripts/restartChrome.sh &gt;/dev/null&nbsp;&nbsp;<br/>* * * * * sleep 20; /usr/local/scripts/restartChrome.sh &gt;/dev/null&nbsp;&nbsp;<br/>* * * * * sleep 30; /usr/local/scripts/restartChrome.sh &gt;/dev/null&nbsp;&nbsp;<br/>* * * * * sleep 40; /usr/local/scripts/restartChrome.sh &gt;/dev/null&nbsp;&nbsp;<br/>* * * * * sleep 50; /usr/local/scripts/restartChrome.sh &gt;/dev/null&nbsp;&nbsp;<br/><br/>简介：<br/>Solution of how to disable Cache in Chromimum browser.<br/>转载请注明出处。 <br/><br/><br/>There&#039;s an option which does not appear in chromium&#039;s manual page --- &quot;-disk-cache-dir&quot;.<br/>This option specifies where the disk cache should be stored.<br/>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.<br/><br/>Here is what the modified chromium-browser-chromium.desktop looks like:<br/>[Desktop&nbsp;&nbsp;Entry] <br/>Name=Chromium Type=Application <br/>Comment=Open-source version of Google Chrome web&nbsp;&nbsp;browser <br/>Exec=chromium-browser %U --disk-cache-dir=/dev/null 2&gt;/dev/null <br/>TryExec=chromium-browser <br/>Icon=chromium-browser<br/>Categories=Network;WebBrowser; <br/>MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;&nbsp;&nbsp; <br/><br/><br/>Why I need to disable file cache?<br/>Well, on my machine, when chromium browser starts up, it keeps reading cache and take a long time to show the homepage.<br/>So I decided to disable it. <br/><br/>来自：http://www.cnblogs.com/yangyingchao/archive/2011/07/30/2178385.html
]]>
</description>
</item><item>
<link>http://www.jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] [实践Ok]How to disable Cache of Chromium （怎样禁用树莓派里的Chromium 浏览器的 Cache)]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>