<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>查理布朗的倒楣世界 &#187; Firefox</title>
	<atom:link href="http://clyang.net/blog/category/tech/firefox-tech/feed" rel="self" type="application/rss+xml" />
	<link>http://clyang.net/blog</link>
	<description>Clyang's Murmuring</description>
	<lastBuildDate>Tue, 27 Mar 2012 20:57:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>當Proxy Pac檔遭遇無法resolve的hostname</title>
		<link>http://clyang.net/blog/2011/06/01/394</link>
		<comments>http://clyang.net/blog/2011/06/01/394#comments</comments>
		<pubDate>Wed, 01 Jun 2011 05:58:54 +0000</pubDate>
		<dc:creator>clyang</dc:creator>
				<category><![CDATA[Firefox]]></category>
		<category><![CDATA[技術]]></category>
		<category><![CDATA[pac]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[proxy pac]]></category>

		<guid isPermaLink="false">http://clyang.net/blog/?p=394</guid>
		<description><![CDATA[今天在Skype聊天室中跟一位學弟討論一段proxy pac檔: function FindProxyForURL(url, host) { if(isInNet(host, &#34;172.28.0.0&#34;, &#34;255.255.0.0&#34;)) return &#34;DIRECT&#34;; else if(dnsDomainIs(host, &#34;stage.clyang.net&#34;)) return &#34;127.0.0.1&#34;; else if(dnsDomainIs(host, &#34;dev.clyang.net&#34;)) return &#34;127.0.0.1&#34;; else return &#34;PROXY 172.30.100.100:2345&#34;; } 當這個設定檔套用進去瀏覽器的時候, 卻發現只要輸入任何的網址都會導致整個IE卡住(輸入ip即可), 討論一下才發現&#8230;. 原來他的所屬環境特別, 連DNS port都被封鎖, 所以任何的domain name反查都會被reject, 因此只要執行到isInNet, browser就會嘗試去做解析的動作, 因為查詢時候查不到, 又得等到timeout才會有true or false的結果, &#8230; <a href="http://clyang.net/blog/2011/06/01/394">繼續閱讀 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>今天在<a href="http://skype.com">Skype</a>聊天室中跟一位學弟討論一段<a href="https://calomel.org/proxy_auto_config.html">proxy pac</a>檔:</p>
<pre class="brush: javascript">

function FindProxyForURL(url, host)

{

if(isInNet(host, &quot;172.28.0.0&quot;, &quot;255.255.0.0&quot;))

return &quot;DIRECT&quot;;

else if(dnsDomainIs(host, &quot;stage.clyang.net&quot;))

return &quot;127.0.0.1&quot;;

else if(dnsDomainIs(host, &quot;dev.clyang.net&quot;))

return &quot;127.0.0.1&quot;;

else

return &quot;PROXY 172.30.100.100:2345&quot;;

}
</pre>
<p>當這個設定檔套用進去瀏覽器的時候, 卻發現只要輸入任何的網址都會導致整個IE卡住(輸入ip即可), 討論一下才發現&#8230;.</p>
<p><span id="more-394"></span></p>
<p>原來他的所屬環境特別, 連DNS port都被封鎖, 所以任何的domain name反查都會被reject, 因此只要執行到isInNet, browser就會嘗試去做解析的動作, 因為查詢時候查不到, 又得等到timeout才會有true or false的結果, 所以當一個頁面需要大量做解析的時候, 就會拖垮整個browser的運作.</p>
<p>為了要避免這種狀況, 又得維持本來設定的條件, 最有效率的方式就是將isInNet那行改成:</p>
<pre class="brush: javascript">

shExpMatch(host, &quot;172.28.*&quot;)
</pre>
<p>原因很簡單, 就是將輸入的hostname直接去最字串的比對, 透過這樣來跳過dns解析, 也就解決了這個問題. 真是上了一課 <img src='http://clyang.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove -->]]></content:encoded>
			<wfw:commentRss>http://clyang.net/blog/2011/06/01/394/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>讓你的Firefox 3.x用起來再更快一點點點點</title>
		<link>http://clyang.net/blog/2009/07/02/335</link>
		<comments>http://clyang.net/blog/2009/07/02/335#comments</comments>
		<pubDate>Wed, 01 Jul 2009 18:19:50 +0000</pubDate>
		<dc:creator>clyang</dc:creator>
				<category><![CDATA[Firefox]]></category>
		<category><![CDATA[技術]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[sqlite]]></category>
		<category><![CDATA[sqlite3]]></category>

		<guid isPermaLink="false">http://clyang.net/blog/?p=335</guid>
		<description><![CDATA[我一直是使用Nightly Build的Firefox，所以我已經使用3.5好長一段時間了，因此Firefox裡面記錄我曾拜訪過的URL也越來越肥大，網路上充斥著幫Firefox的資料庫瘦身減肥的方法，當然是有效的，在網址列輸入網址時也可以感受到明顯的速度提升，但是資料庫瘦身後，總希望在鍵入URL時，Firefox可以在查的快一點點(這是個人奇怪的堅持 XD)，於是腦袋就動到資料庫的部份了，希望能找到一個方法不用動到內部的結構，卻可以稍微提升效率的方法。 故事要從頭說起，Firefox 3.x以後開始使用SQLite3為底層使用的資料庫，許多對應的addons/plugins也陸續採用其為儲存資料的用其，直覺上就認為人應該是SQLite殺的，所以很自然而然的就跑到SQLite的官方網站繞繞，結果在ChangeLog中看到這一段: SQLite version 3.6.14 provides new performance enhancements in the btree and pager layers and in the query optimizer. Certain workloads can be as much as twice as fast as the previous release, though 10% faster &#8230; <a href="http://clyang.net/blog/2009/07/02/335">繼續閱讀 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>我一直是使用Nightly Build的<a title="Firefox" href="http://www.firefox.com/" target="_blank">Firefox</a>，所以我已經使用3.5好長一段時間了，因此<a title="Firefox" href="http://www.firefox.com/" target="_blank">Firefox</a>裡面記錄我曾拜訪過的URL也越來越肥大，網路上充斥著幫<a title="Firefox" href="http://www.firefox.com/" target="_blank">Firefox</a>的資料庫瘦身減肥的方法，當然是有效的，在網址列輸入網址時也可以感受到明顯的速度提升，但是資料庫瘦身後，總希望在鍵入URL時，<a title="Firefox" href="http://www.firefox.com/" target="_blank">Firefox</a>可以在查的快一點點(這是個人奇怪的堅持 XD)，於是腦袋就動到資料庫的部份了，希望能找到一個方法不用動到內部的結構，卻可以稍微提升效率的方法。</p>
<p><span id="more-335"></span></p>
<p>故事要從頭說起，<a title="Firefox" href="http://www.firefox.com/" target="_blank">Firefox</a> 3.x以後開始使用<a title="sqlite" href="http://www.sqlite.org/" target="_blank">SQLite</a>3為底層使用的資料庫，許多對應的addons/plugins也陸續採用其為儲存資料的用其，直覺上就認為人應該是<a title="sqlite" href="http://www.sqlite.org/" target="_blank">SQLite</a>殺的，所以很自然而然的就跑到<a title="sqlite" href="http://www.sqlite.org/" target="_blank">SQLite</a>的官方網站繞繞，結果在<a title="SQLite 3.6.14 changelog" href="http://www.sqlite.org/releaselog/3_6_14.html" target="_blank">ChangeLog</a>中看到這一段:</p>
<blockquote><p><a title="sqlite" href="http://www.sqlite.org/" target="_blank">SQLite</a> version 3.6.14 provides new performance enhancements in the btree and pager layers and in the query optimizer. <strong>Certain workloads can be as much as twice as fast as the previous release, though 10% faster is a more typical result.</strong></p>
<p>簡單的說就是 3.6.14以後效率有稍微提升，在某些workload可以提升到兩倍，但是一般來說平均約有10%的增加。</p></blockquote>
<p>看到以後，當然是欣喜若狂阿，馬上檢查一下手邊的<a title="Firefox" href="http://www.firefox.com/" target="_blank">Firefox</a> 3.5所使用的<a title="sqlite" href="http://www.sqlite.org/" target="_blank">SQLite</a>3 dll的版本，果然只有在3.6.10，所以馬上下載最新的DLL檔來使用，步驟如下:</p>
<ol>
<li>下載<a title="sqlite 3.6.16 windows dll" href="http://www.sqlite.org/sqlitedll-3_6_16.zip" target="_blank">最新版本的SQLite DLL</a> (目前是3.6.16)</li>
<li>解壓縮後，直接覆蓋安裝<a title="Firefox" href="http://www.firefox.com/" target="_blank">Firefox</a>目錄下的sqlite.dll</li>
<li>重新啟動<a title="Firefox" href="http://www.firefox.com/" target="_blank">Firefox</a>即可</li>
</ol>
<p>簡單幾個步驟就搞定了，我自己是有感覺在輸入URL時稍微沒那麼lag了，當然你可以說10%的增加怎麼可能感覺的出來，一定是我自己的心理作用，但是透過簡單一些步驟，就可以賺到在跟資料庫部份的10%提升，還是蠻值得的阿!!</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>後記，寫完之後<a title="Google" href="http://www.google.com/" target="_blank">google</a>了一下，發現大陸人也有人在玩這招，不過語焉不詳，沒有提出實際的證明阿，只提到"更新到最新的<a title="sqlite" href="http://www.sqlite.org/" target="_blank">SQLite</a>應該可以快一點，因為<a title="sqlite" href="http://www.sqlite.org/" target="_blank">SQLite</a>的開發者會持續的精進效能。"這是什麼鬼邏輯 Orz~</p>
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove -->]]></content:encoded>
			<wfw:commentRss>http://clyang.net/blog/2009/07/02/335/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Firefox 3.1如何實作searchplugins</title>
		<link>http://clyang.net/blog/2009/01/16/73</link>
		<comments>http://clyang.net/blog/2009/01/16/73#comments</comments>
		<pubDate>Thu, 15 Jan 2009 19:21:55 +0000</pubDate>
		<dc:creator>clyang</dc:creator>
				<category><![CDATA[Firefox]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[searchplugins]]></category>
		<category><![CDATA[匯率換算]]></category>

		<guid isPermaLink="false">http://clyang.net/blog/?p=73</guid>
		<description><![CDATA[因為人在澳洲，在逛線上購物的網站時常常會需要做匯率的計算，所以自然而然腦筋就動到firefox的search框框上去了。 之前在firefox 2.x的時候有自己implement過search plugin， 基本上就是寫個簡單的xml檔，然後放到%Firefox安裝目錄%\searchplugins裡面就會動了，但是今天在做的時候卻始終無法出現我自製的searchplugins。 到網路上找了一下，發現一個簡單的解決方法: 刪除 C:\Documents and Settings\你的使用者名稱\Application Data\Mozilla\Firefox\Profiles\一組亂碼.default\search.json 重開firefox後就出現啦。 最後，順便分享一下我製作的匯率轉匯程式，你可以輕易的將相關幣別修改轉匯換成你所需的。 &#60;SearchPlugin xmlns=&#34;http://www.mozilla.org/2006/browser/search/&#34;&#62; &#60;ShortName&#62;Yahoo Ex!&#60;/ShortName&#62; &#60;Description&#62;Yahoo Exchange&#60;/Description&#62; &#60;InputEncoding&#62;UTF-8&#60;/InputEncoding&#62; &#60;Image width=&#34;16&#34; height=&#34;16&#34;&#62;data:image/x-icon;base64,R0lGODlhEAAQAJECAP8AAAAAAP///wAAACH5BAEAAAIALAAAAAAQABAAAAIplI+py+0NogQuyBDEnEd2kHkfFWUamEzmpZSfmaIHPHrRguUm/fT+UwAAOw==&#60;/Image&#62; &#60;Url type=&#34;text/html&#34; method=&#34;GET&#34; template=&#34;http://tw.money.yahoo.com/currency_exc_result&#34;&#62; &#60;Param name=&#34;amt&#34; value=&#34;{searchTerms}&#34;/&#62; &#60;Param name=&#34;from&#34; value=&#34;AUD&#34;/&#62; &#60;Param name=&#34;to&#34; value=&#34;TWD&#34;/&#62; &#60;/Url&#62; &#60;SearchForm&#62;http://tw.money.yahoo.com/&#60;/SearchForm&#62; &#60;/SearchPlugin&#62;]]></description>
			<content:encoded><![CDATA[<p>因為人在澳洲，在逛線上購物的網站時常常會需要做匯率的計算，所以自然而然腦筋就動到<a title="firefox" href="http://www.mozilla.com/en-US/firefox/" target="_blank">firefox</a>的search框框上去了。 之前在<a title="firefox" href="http://www.mozilla.com/en-US/firefox/" target="_blank">firefox</a> 2.x的時候有自己implement過search plugin， 基本上就是寫個簡單的xml檔，然後放到%Firefox安裝目錄%\searchplugins裡面就會動了，但是今天在做的時候卻始終無法出現我自製的searchplugins。</p>
<p>到網路上找了一下，發現一個簡單的解決方法:</p>
<blockquote><p>刪除 C:\Documents and Settings\你的使用者名稱\Application Data\Mozilla\Firefox\Profiles\一組亂碼.default\search.json</p></blockquote>
<p>重開<a title="firefox" href="http://www.mozilla.com/en-US/firefox/" target="_blank">firefox</a>後就出現啦。</p>
<p>最後，順便分享一下我製作的匯率轉匯程式，你可以輕易的將相關幣別修改轉匯換成你所需的。</p>
<pre class="brush: xml">
&lt;SearchPlugin xmlns=&quot;http://www.mozilla.org/2006/browser/search/&quot;&gt;
&lt;ShortName&gt;Yahoo Ex!&lt;/ShortName&gt;
&lt;Description&gt;Yahoo Exchange&lt;/Description&gt;
&lt;InputEncoding&gt;UTF-8&lt;/InputEncoding&gt;
&lt;Image width=&quot;16&quot; height=&quot;16&quot;&gt;data:image/x-icon;base64,R0lGODlhEAAQAJECAP8AAAAAAP///wAAACH5BAEAAAIALAAAAAAQABAAAAIplI+py+0NogQuyBDEnEd2kHkfFWUamEzmpZSfmaIHPHrRguUm/fT+UwAAOw==&lt;/Image&gt;
&lt;Url type=&quot;text/html&quot; method=&quot;GET&quot; template=&quot;http://tw.money.yahoo.com/currency_exc_result&quot;&gt;
  &lt;Param name=&quot;amt&quot; value=&quot;{searchTerms}&quot;/&gt;
  &lt;Param name=&quot;from&quot; value=&quot;AUD&quot;/&gt;
  &lt;Param name=&quot;to&quot; value=&quot;TWD&quot;/&gt;
&lt;/Url&gt;
&lt;SearchForm&gt;http://tw.money.yahoo.com/&lt;/SearchForm&gt;
&lt;/SearchPlugin&gt;
</pre>
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove -->]]></content:encoded>
			<wfw:commentRss>http://clyang.net/blog/2009/01/16/73/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

