<?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://lifesinger.org/blog/tag/firefox/feed/" rel="self" type="application/rss+xml" />
	<link>http://lifesinger.org/blog</link>
	<description>关注用户体验、前端开发，记录生活点滴、岁月足迹。</description>
	<lastBuildDate>Mon, 06 Sep 2010 15:05:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Script 元素的异步加载属性</title>
		<link>http://lifesinger.org/blog/2010/03/script-async-attribute/</link>
		<comments>http://lifesinger.org/blog/2010/03/script-async-attribute/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 10:15:58 +0000</pubDate>
		<dc:creator>lifesinger</dc:creator>
				<category><![CDATA[开发]]></category>
		<category><![CDATA[async]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://lifesinger.org/blog/?p=2446</guid>
		<description><![CDATA[进入正题之前，先考大家一个问题：defer 属性现在有哪些浏览器支持？ 喜悦 除了 defer 属性，script 还新增了一个 async 属性，请看 MDC： async Requires Gecko 1.9.2 This Boolean attribute is set to indicate that the browser should, if possible, execute the script asynchronously. If the script cannot be executed asynchronously, or the browser doesn&#8217;t support this attribute, the script is executed synchronously (and loading the content blocks [...]]]></description>
			<content:encoded><![CDATA[<p>进入正题之前，先考大家一个问题：defer 属性现在有哪些浏览器支持？</p>
<h3>喜悦</h3>
<p>除了 defer 属性，script 还新增了一个 async 属性，请看 <a href="https://developer.mozilla.org/En/HTML/Element/Script">MDC</a>：</p>
<blockquote><p>
async Requires Gecko 1.9.2<br />
This Boolean attribute is set to indicate that the browser should, if possible, execute the script asynchronously. If the script cannot be executed asynchronously, or the browser doesn&#8217;t support this attribute, the script is executed synchronously (and loading the content blocks until the script finishes running).
</p></blockquote>
<p>理想情况下，利用 async 属性，脚本异步加载将变得非常简单：<br />
async-test.js:</p>
<pre>
var g = 1;
</pre>
<p>async-test-1.html:</p>
<pre>
&lt;script src="async-test.js" async="true"&gt;&lt;/script&gt;
&lt;script&gt;
    alert(typeof g); // Firefox 3.6 弹出 undefined
&lt;/script&gt;
</pre>
<p>测试页面：<a href="http://lifesinger.googlecode.com/svn/trunk/lab/2010/ad-script/async-test-1.html">async-test-1.html</a><br />
目前只有 Firefox 3.6 支持 async 属性，希望其它浏览器能迅速跟进。<br />
<span id="more-2446"></span></p>
<h3>悲哀</h3>
<p>Firefox 3.6 的尝试和探索精神令人钦佩。但是，在引入这个新特性时，也导致了传统异步加载方式的失效：</p>
<pre>
&lt;script&gt;
    (function(d) {
        var a = d.createElement('script');
        a.src = 'async-test.js';
        d.getElementsByTagName('head')[0].appendChild(a);
    })(document);
&lt;/script&gt;
&lt;script&gt;
    alert(typeof g); // 预期结果是 undefined, Firefox 3.6 弹出 number
&lt;/script&gt;
</pre>
<p>测试页面：<a href="http://lifesinger.googlecode.com/svn/trunk/lab/2010/ad-script/async-test-2.html">async-test-2.html</a><br />
真糟糕！类似问题，还有 Steve Souders 前不久发现的 <a href="http://www.stevesouders.com/blog/2010/02/10/5b-document-write-scripts-block-in-firefox/">document.write 在 Firefox 3.6 下的阻塞行为</a>。</p>
<h3>分析</h3>
<p>用 Firebug 可以看到，在 Firefox 3.6 中，script 元素 async 属性的默认值是 false. 换言之，script 元素默认是同步加载的。可以推测，Firefox 3.6 在增加 async 这个属性时，很可能忽略了用 createElement(&#8216;script&#8217;) 和 document.write(&#8216;&lt;script&#8230;&#8217;) 等方式创建的 script 元素，async 的属性值应该从默认值 false 调整为 true. 正是这个疏忽，导致了传统加载异步脚本的方式在 Firefox 3.6 中失效。对于 YUI3 和很多站点来说，这实在是太糟糕了。</p>
<p>知道了问题本因，可以得到目前异步加载脚本最安全的方式如下：</p>
<pre>
&lt;script&gt;
    (function(d) {
        var a = d.createElement('script');
        a.async = true;
        a.src = 'async-test.js';
        d.getElementsByTagName('head')[0].appendChild(a);
    })(document);
&lt;/script&gt;
</pre>
<p>测试页面：<a href="http://lifesinger.googlecode.com/svn/trunk/lab/2010/ad-script/async-test-3.html">async-test-3.html</a></p>
<p>注意1：所有测试结果，均在无缓存的情况下得出。<br />
注意2：async-test-2.html 和 async-test-3.html 在 Opera 10.10 中弹出值非预期，原因未深究，有兴趣者可以进一步挖掘。</p>
<h3>感慨</h3>
<p>Google 在 <a href="http://code.google.com/apis/analytics/docs/tracking/asyncUsageGuide.html">ga 的部署脚本</a> 中已经使用上了 async 属性：</p>
<pre>
&lt;script type="text/javascript"&gt;
    (function() {
      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
      (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
    })();
  &lt;/script&gt;
</pre>
<h3>最后</h3>
<p>再考大家一题，在 Firefox 3.6 下，下面的代码，alert 出什么：</p>
<pre>
&lt;script src="async-test.js" async="false"&gt;&lt;/script&gt;
&lt;script&gt;
    alert(typeof g); // ?
&lt;/script&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://lifesinger.org/blog/2010/03/script-async-attribute/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Firefox扩展更新的解决办法</title>
		<link>http://lifesinger.org/blog/2009/05/firefox-update-hack/</link>
		<comments>http://lifesinger.org/blog/2009/05/firefox-update-hack/#comments</comments>
		<pubDate>Sun, 03 May 2009 01:36:54 +0000</pubDate>
		<dc:creator>lifesinger</dc:creator>
				<category><![CDATA[工具]]></category>
		<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://lifesinger.org/blog/?p=1618</guid>
		<description><![CDATA[最近Firefox升级老是报 download error -228. 这是升级服务器的中国镜像挂掉了引起的。 解决办法很简单，到镜像列表页面 http://www.mozilla.org/mirrors.html 找一个可以访问的服务器，ping出ip后，在hosts里绑定到releases.mozilla.org. 比如我的： # mozilla update 204.152.184.113 releases.mozilla.org 推荐使用Primary Mirrors, 稳定可靠。]]></description>
			<content:encoded><![CDATA[<p>最近Firefox升级老是报 download error -228. 这是升级服务器的中国镜像挂掉了引起的。</p>
<p>解决办法很简单，到镜像列表页面 <a href="http://www.mozilla.org/mirrors.html">http://www.mozilla.org/mirrors.html</a> 找一个可以访问的服务器，ping出ip后，在hosts里绑定到releases.mozilla.org. 比如我的：</p>
<pre>
# mozilla update
204.152.184.113    releases.mozilla.org
</pre>
<p>推荐使用Primary Mirrors, 稳定可靠。</p>
]]></content:encoded>
			<wfw:commentRss>http://lifesinger.org/blog/2009/05/firefox-update-hack/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>JavaScript的几个诡异问题</title>
		<link>http://lifesinger.org/blog/2009/02/javascript-mysterious-bugs/</link>
		<comments>http://lifesinger.org/blog/2009/02/javascript-mysterious-bugs/#comments</comments>
		<pubDate>Sat, 07 Feb 2009 14:24:29 +0000</pubDate>
		<dc:creator>lifesinger</dc:creator>
				<category><![CDATA[开发]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://lifesinger.org/blog/?p=1140</guid>
		<description><![CDATA[先看IE的一个现象 从非常简单的一个例子开始： f(); function f() { alert('test'); } 上面的代码所有浏览器都能正确执行，原因是“预解析”（如果不了解，请阅读 JavaScript运行机制浅探）。 稍微变化一下： f(); var a = function f() { alert('test'); }; 上面的代码在IE下能正确执行，在其它浏览器下，提示f未定义。原因是：函数表达式和函数声明是不同的语法结构，非IE浏览器只会预解析函数声明，IE却会连函数表达式也一块预解析了。 Firefox的诡异现象 休息下，看个谁都知道答案的： var test = 'right'; function f() { alert(test); }; f(); // => 'right' 休息完毕，来点花样： Object.prototype.test = 'wrong'; var test = 'right'; (function f() { alert(test); })(); Firefox的结果是&#8217;wrong&#8217;, 其它浏览器都是&#8217;right&#8217;. 诡异的Firefox, 这究竟是为什么呢？ 将代码稍微修改下： Object.prototype.test [...]]]></description>
			<content:encoded><![CDATA[<h3>先看IE的一个现象</h3>
<p>从非常简单的一个例子开始：</p>
<pre>
f();
function f() { alert('test'); }
</pre>
<p>上面的代码所有浏览器都能正确执行，原因是“预解析”（如果不了解，请阅读 <a href="http://lifesinger.org/blog/?p=1003">JavaScript运行机制浅探</a>）。</p>
<p>稍微变化一下：</p>
<pre>
f();
var a = function f() { alert('test'); };
</pre>
<p>上面的代码在IE下能正确执行，在其它浏览器下，提示f未定义。原因是<span id="more-1140"></span>：函数表达式和函数声明是不同的语法结构，非IE浏览器只会预解析函数声明，IE却会连函数表达式也一块预解析了。</p>
<h3>Firefox的诡异现象</h3>
<p>休息下，看个谁都知道答案的：</p>
<pre>
var test = 'right';
function f() { alert(test); };
f(); // => 'right'
</pre>
<p>休息完毕，来点花样：</p>
<pre>
Object.prototype.test = 'wrong';
var test = 'right';
(function f() {
    alert(test);
})();
</pre>
<p>Firefox的结果是&#8217;wrong&#8217;, 其它浏览器都是&#8217;right&#8217;. 诡异的Firefox, 这究竟是为什么呢？</p>
<p>将代码稍微修改下：</p>
<pre>
Object.prototype.test = 'wrong';
var test = 'right';
(function f() {
    alert(test);
    alert(window.test);
    alert(f.test);
})();
</pre>
<p>可以看出，在Firefox下，<code>function f() { ... }</code>中的test等于f.test. 更进一步可以发现，Firefox下，<code>f.test == f.__proto__.test</code>, 因此值为wrong.</p>
<p>再做一些改变：</p>
<pre>
Object.prototype.test = 'wrong';
var test = 'right';
(function() {
    alert(test);
})();
</pre>
<p>变成匿名函数后，所有浏览器都弹出&#8217;right&#8217;了。</p>
<p>更诡异的是，将第一行去掉：</p>
<pre>
var test = 'right';
(function f() {
    alert(test);
})();
</pre>
<p>具名函数，在Firefox下，也能正确输出&#8217;right&#8217;了。</p>
<p>问题似乎可以简单总结为：Firefox下，Object.prototype.test会影响具名函数内部的test变量。</p>
<h3>想弄明白为什么</h3>
<p>对于函数声明，我们都很清楚：</p>
<pre>
function functionName(args) {
    // body
}
</pre>
<p>除了上面这种语法格式，其它写法中出现的function，都是函数表达式：</p>
<pre>
(function() {
    alert('haha');
})();

(function xx() {
    alert('haha');
})();

void function() {
    alert('haha');
}();

!function() {
    alert('haha');
}();
</pre>
<p>无论是括号<code>()</code>（强制运算符），还是<code>void</code>，甚至<code>!</code>等运算符，都将function变成了语法结构中的函数表达式，在运行期才会解析（IE除外）。</p>
<p>回到Firefox下具名函数表达式变量的解析问题：</p>
<pre>
Object.prototype.test = 'wrong';
(function () {
    alert({}.test);
    alert(window.test);
})();
</pre>
<p>事情越来越诡异，IE下，window.test居然等于undefined.</p>
<p>再看一个越发让人发昏的例子：</p>
<pre>
alert(window instanceof Object);
</pre>
<p>Firefox和IE下，为false. Chrome, Safari, Opera为true.</p>
<p>也就是说，Firefox和IE下的window对象并没有继承自Object, 其内部有更复杂的处理机制（期待源码级揭秘），这导致了以上各种诡异问题。</p>
<h3>并非所有问题都需要探根究底</h3>
<p>总结下上文中提及的所有诡异问题：</p>
<p>1. IE对函数表达式也做预解析的bug:</p>
<pre>
f();
(function f() { alert('test') })();
</pre>
<p>2. IE的window.test, 不会追溯到Object.prototype.test:</p>
<pre>
Object.prototype.test = 'test';
alert(window.test);
</pre>
<p>3. Firefox的window.test, 在具名函数表达式中，某些写法下，读取时会出错：</p>
<pre>
Object.prototype.test = 'test';
var test = 'test2';
(function f() {
    alert(test);
})();
</pre>
<p>最后两个问题的原因是：Firefox和IE下的window对象没有直接继承自Object, 其内部有更复杂的处理机制。</p>
<p>和很多CSS bugs一样，以上问题并不一定都值得我们花费大量时间去探根究底。我们只要记住现象，知道如何避免，就足够了。对《<a href="http://www.positioniseverything.net/explorer/dup-characters.html">Explorer 6 Duplicate Characters Bug</a>》一文的最后一句话记忆犹新：</p>
<blockquote><p>
The effects can get even weirder but there&#8217;s no need to become obsessed, so we&#8217;ll quietly close the door on this crazy bug.
</p></blockquote>
<h3>良好的编码习惯</h3>
<p>避免以上各种诡异bugs最有效的良药是：养成良好的编码习惯。比如：</p>
<ul>
<li>尽量少用全局变量。</li>
<li>不要在函数表达式中使用具名函数。</li>
</ul>
<p>做到以上两条，本文出现的诡异问题，就都可以避免出现。</p>
]]></content:encoded>
			<wfw:commentRss>http://lifesinger.org/blog/2009/02/javascript-mysterious-bugs/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Firefox非主流开发扩展推荐</title>
		<link>http://lifesinger.org/blog/2009/01/firefox-non-mainstream-addons/</link>
		<comments>http://lifesinger.org/blog/2009/01/firefox-non-mainstream-addons/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 14:51:03 +0000</pubDate>
		<dc:creator>lifesinger</dc:creator>
				<category><![CDATA[工具]]></category>
		<category><![CDATA[add-ons]]></category>
		<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://lifesinger.org/blog/?p=971</guid>
		<description><![CDATA[Firebug已经家喻户晓，不必多说。下面推荐的是些村酒野蔬，虽没什么名气，但其味醇厚甜美，食之飘香再难忘情。 HTML Validator http://users.skynet.be/mgueury/mozilla/ 很喜欢这个扩展的Tidy算法模式，可以检查出HTML页面中绝大部分嵌套和书写错误，并且针对每个错误都有详细的说明和推荐写法。当然，很多时候，我们不大可能去纠正所有错误和警告。一个常用的小技巧是：将可以容忍的错误添加到Hidden列表中。这样，只要看看右下角的状态信息，就知道页面中是否还有错误了。 Launchy https://addons.mozilla.org/en-US/firefox/addon/81 这个扩展相见恨晚，一见就再也离不开了。如上图所示，能很方便的让我们在不同浏览器中加载测试页面，还可以配置编辑器。注意的是：默认情况下，Launchy会自动探测浏览器和编辑器，我的习惯是将自动探测关闭，按照选项里的说明，在chrome目录下通过launchy.xml手动指定菜单项。这是我的配置文件：Firefoxprofilechromelaunchy.xml. 目前IETester只能打开，不知道怎么传送参数过去，还希望知道的指点一下。（IETester 0.3已经支持Command line arguments） Fiddler Switch https://addons.mozilla.org/en-US/firefox/addon/9373 在前端开发界，有这么一个说法：Firefox + Firebug + Fiddler，称之为 3F，拯救了前端的工作。Fiddler是个伟大的工具，默认在IE上工作得挺好，但在Firefox上需要设置代理，有点麻烦，Fiddler Switch就是Taobao UED空帷达人为了解决此问题而开发的。如果你还没用过Fiddler，推荐阅读下这篇文章：如何直接调试线上页面的JavaScript和CSS。 Johnny Cache https://addons.mozilla.org/en-US/firefox/addon/3817 是否厌倦了 Ctrl + F5? 是否有时忘了切换 Web Developer Toolbar 禁用的Cache，而导致上网很慢？Johnny Cache让你一次配置，永久解决烦恼。我很喜欢这种谦虚却非常实用的扩展。 Firefox DNS Flusher https://addons.mozilla.org/en-US/firefox/addon/7408 这也是一款非常谦虚但绝对实用的扩展。开发测试时，经常要修改hosts文件。但默认情况下，Firefox会缓存DNS，修改hosts文件后，有时得重启Firefox才能生效，这是很让人恼火的。装了这个扩展，就再也不用等待漫长的重启了。同时，还拥有了一个附加功能：直接查看域名的ip. MeasureIt https://addons.mozilla.org/en-US/firefox/addon/539 根据mockup制作精确的demo是前端工程师们的日常工作，通常的做法是在Photoshop或其它图像处理软件中测量，但来回切换窗口是有点影响效率的。MeasureIt能让你直接在页面中的测量，方便快捷。 我的Firefox上，除了Firebug, 开发用的扩展就上面这些了。除了MeasureIt用的频率不是很多，其它扩展几乎天天都用。感谢这些扩展，让我有更多的时间好好生活。]]></description>
			<content:encoded><![CDATA[<p>Firebug已经家喻户晓，不必多说。下面推荐的是些村酒野蔬，虽没什么名气，但其味醇厚甜美，食之飘香再难忘情。</p>
<h3>HTML Validator</h3>
<p><img src="http://lifesinger.org/blog/wp-content/uploads/2009/01/html_validator.png" alt="html_validator" title="html_validator" width="212" height="76" class="alignnone size-full wp-image-972" /><br />
<a href="http://users.skynet.be/mgueury/mozilla/">http://users.skynet.be/mgueury/mozilla/</a></p>
<p>很喜欢这个扩展的Tidy算法模式，可以检查出HTML页面中绝大部分嵌套和书写错误，并且针对每个错误都有详细的说明和推荐写法。当然，很多时候，我们不大可能去纠正所有错误和警告。一个常用的小技巧是：将可以容忍的错误添加到Hidden列表中。这样，只要看看右下角的状态信息，就知道页面中是否还有错误了。</p>
<h3>Launchy</h3>
<p><img src="http://lifesinger.org/blog/wp-content/uploads/2009/01/launchy.png" alt="launchy" title="launchy" width="451" height="245" class="alignnone size-full wp-image-973" /><br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/81">https://addons.mozilla.org/en-US/firefox/addon/81</a></p>
<p>这个扩展相见恨晚，一见就再也离不开了。如上图所示，能很方便的<span id="more-971"></span>让我们在不同浏览器中加载测试页面，还可以配置编辑器。注意的是：默认情况下，Launchy会自动探测浏览器和编辑器，我的习惯是将自动探测关闭，按照选项里的说明，在chrome目录下通过launchy.xml手动指定菜单项。这是我的配置文件：<a href="http://lifesinger.org/blog/wp-content/uploads/2009/01/launchy.xml">Firefoxprofilechromelaunchy.xml</a>. <del datetime="2009-02-16T08:56:55+00:00">目前IETester只能打开，不知道怎么传送参数过去，还希望知道的指点一下。</del>（IETester 0.3已经支持Command line arguments）</p>
<h3>Fiddler Switch</h3>
<p><img src="http://lifesinger.org/blog/wp-content/uploads/2009/01/fiddler_switch.png" alt="fiddler_switch" title="fiddler_switch" width="264" height="69" class="alignnone size-full wp-image-974" /><br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/9373">https://addons.mozilla.org/en-US/firefox/addon/9373</a></p>
<p>在前端开发界，有这么一个说法：Firefox + Firebug + Fiddler，称之为 3F，拯救了前端的工作。Fiddler是个伟大的工具，默认在IE上工作得挺好，但在Firefox上需要设置代理，有点麻烦，Fiddler Switch就是Taobao UED空帷达人为了解决此问题而开发的。如果你还没用过Fiddler，推荐阅读下这篇文章：<a href="http://lifesinger.org/blog/?p=40">如何直接调试线上页面的JavaScript和CSS</a>。</p>
<h3>Johnny Cache</h3>
<p><img src="http://lifesinger.org/blog/wp-content/uploads/2009/01/johnnycache.png" alt="johnnycache" title="johnnycache" width="312" height="209" class="alignnone size-full wp-image-975" /><br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/3817">https://addons.mozilla.org/en-US/firefox/addon/3817</a></p>
<p>是否厌倦了 Ctrl + F5? 是否有时忘了切换 Web Developer Toolbar 禁用的Cache，而导致上网很慢？Johnny Cache让你一次配置，永久解决烦恼。我很喜欢这种谦虚却非常实用的扩展。</p>
<h3>Firefox DNS Flusher</h3>
<p><img src="http://lifesinger.org/blog/wp-content/uploads/2009/01/dns_flusher.png" alt="dns_flusher" title="dns_flusher" width="279" height="63" class="alignnone size-full wp-image-976" /><br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/7408">https://addons.mozilla.org/en-US/firefox/addon/7408</a></p>
<p>这也是一款非常谦虚但绝对实用的扩展。开发测试时，经常要修改hosts文件。但默认情况下，Firefox会缓存DNS，修改hosts文件后，有时得重启Firefox才能生效，这是很让人恼火的。装了这个扩展，就再也不用等待漫长的重启了。同时，还拥有了一个附加功能：直接查看域名的ip.</p>
<h3>MeasureIt</h3>
<p><img src="http://lifesinger.org/blog/wp-content/uploads/2009/01/measureit.png" alt="measureit" title="measureit" width="373" height="98" class="alignnone size-full wp-image-977" /><br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/539">https://addons.mozilla.org/en-US/firefox/addon/539</a></p>
<p>根据mockup制作精确的demo是前端工程师们的日常工作，通常的做法是在Photoshop或其它图像处理软件中测量，但来回切换窗口是有点影响效率的。MeasureIt能让你直接在页面中的测量，方便快捷。</p>
<p>我的Firefox上，除了Firebug, 开发用的扩展就上面这些了。除了MeasureIt用的频率不是很多，其它扩展几乎天天都用。感谢这些扩展，让我有更多的时间好好生活。</p>
]]></content:encoded>
			<wfw:commentRss>http://lifesinger.org/blog/2009/01/firefox-non-mainstream-addons/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Firefox下，表单元素的autocomplete属性</title>
		<link>http://lifesinger.org/blog/2008/10/firefox-autocomplete/</link>
		<comments>http://lifesinger.org/blog/2008/10/firefox-autocomplete/#comments</comments>
		<pubDate>Tue, 28 Oct 2008 12:39:29 +0000</pubDate>
		<dc:creator>lifesinger</dc:creator>
				<category><![CDATA[开发]]></category>
		<category><![CDATA[autocomplete]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[form]]></category>

		<guid isPermaLink="false">http://lifesinger.org/blog/?p=569</guid>
		<description><![CDATA[在25日的扯淡里，碰巧发现了autocomplete的作用。今天看见realazy兄遇到按扭状态未还原问题，通过js来重置。其实用autocomplete就可以轻松解决： &#60;input name="submitBtn" autocomplete="off" type="submit" value="提交" /&#62; 这样，后退或刷新页面时，Firefox就不会自动记忆表单状态了。 演示页面：firefox_autocomplete_test.php 详细资料：How to Turn Off Form Autocompletion]]></description>
			<content:encoded><![CDATA[<p>在<a href="http://lifesinger.org/blog/?p=507">25日的扯淡</a>里，碰巧发现了autocomplete的作用。今天看见realazy兄遇到<a href="http://realazy.org/blog/2008/10/27/a-solution-to-firefox-back-button-disabled/">按扭状态未还原问题</a>，通过js来重置。其实用autocomplete就可以轻松解决：</p>
<pre>
&lt;input name="submitBtn" <strong>autocomplete="off"</strong> type="submit" value="提交" /&gt;
</pre>
<p>这样，后退或刷新页面时，Firefox就不会自动记忆表单状态了。</p>
<p>演示页面：<a href="http://lifesinger.org/lab/2008/firefox_autocomplete_test.php">firefox_autocomplete_test.php</a></p>
<p>详细资料：<a href="https://developer.mozilla.org/En/How_to_Turn_Off_Form_Autocompletion">How to Turn Off Form Autocompletion</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lifesinger.org/blog/2008/10/firefox-autocomplete/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>
