<?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; favicon</title>
	<atom:link href="http://bluehua.org/tag/favicon/feed" rel="self" type="application/rss+xml" />
	<link>http://bluehua.org</link>
	<description>分享所学,backup一切~</description>
	<lastBuildDate>Wed, 23 Nov 2011 08:43:10 +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>firefox favicon丢失</title>
		<link>http://bluehua.org/2009/09/21/579.html</link>
		<comments>http://bluehua.org/2009/09/21/579.html#comments</comments>
		<pubDate>Mon, 21 Sep 2009 14:27:39 +0000</pubDate>
		<dc:creator>冥王星2011</dc:creator>
				<category><![CDATA[web dev]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[favicon]]></category>
		<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://bluehua.org/?p=579</guid>
		<description><![CDATA[测试环境: firefox3.0 &#8211; 3.5 强大的qa同学,连favicon都照顾到了,具体情况:有个页面刚进去的时候时kaixin网的favicon,加载完毕是人人网的favicon~ demo:http://bluehua.org/demo/favicon_firefox.html &#60;html&#62; &#60;head&#62; &#60;link href=&#34;http://www.google.cn/favicon.ico&#34; rel=&#34;shortcut icon&#34; type=&#34;image/x-icon&#34; /&#62; &#60;/head&#62; &#60;body&#62; &#60;script&#62; window.location.href = '#fdsafasd'; &#60;/script&#62; &#60;/body&#62; &#60;/html&#62; 页面加载过程中,如果使用脚本修改锚点,firefox便会到server的根目录取默认的favicon.ico,如果取不到就变空了,如果取到了,但跟指定的favicon不一样,情况就跟qa同学看到的一样,更神奇了.. 但是发现像下面这样window.onload时改变锚点没有问题 demo:http://bluehua.org/demo/favicon_firefox_onload.html &#60;html&#62; &#60;head&#62; &#60;link href=&#34;http://www.google.cn/favicon.ico&#34; rel=&#34;shortcut icon&#34; type=&#34;image/x-icon&#34; /&#62; &#60;/head&#62; &#60;body&#62; &#60;script&#62; window.onload=function&#40;&#41; &#123; window.location.href = '#fdsafasd'; &#125;; &#60;/script&#62; &#60;/body&#62; &#60;/html&#62;]]></description>
			<content:encoded><![CDATA[<p>测试环境: firefox3.0 &#8211; 3.5</p>
<p>强大的qa同学,连favicon都照顾到了,具体情况:有个页面刚进去的时候时kaixin网的favicon,加载完毕是人人网的favicon~</p>
<p>demo:<a href="http://bluehua.org/demo/favicon_firefox.html">http://bluehua.org/demo/favicon_firefox.html</a></p>

<div class="wp_syntax"><div class="code overflow"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>html<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>head<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>link href<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;http://www.google.cn/favicon.ico&quot;</span> rel<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;shortcut icon&quot;</span> type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;image/x-icon&quot;</span> <span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;/</span>head<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>body<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>script<span style="color: #339933;">&gt;</span>
window.<span style="color: #660066;">location</span>.<span style="color: #660066;">href</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'#fdsafasd'</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>body<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>html<span style="color: #339933;">&gt;</span></pre></div></div>

<p>页面加载过程中,如果使用脚本修改锚点,firefox便会到server的根目录取默认的favicon.ico,如果取不到就变空了,如果取到了,但跟指定的favicon不一样,情况就跟qa同学看到的一样,更神奇了..</p>
<p>但是发现像下面这样window.onload时改变锚点没有问题<br />
demo:<a href="http://bluehua.org/demo/favicon_firefox_onload.html">http://bluehua.org/demo/favicon_firefox_onload.html</a></p>

<div class="wp_syntax"><div class="code overflow"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>html<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>head<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>link href<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;http://www.google.cn/favicon.ico&quot;</span> rel<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;shortcut icon&quot;</span> type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;image/x-icon&quot;</span> <span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;/</span>head<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>body<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>script<span style="color: #339933;">&gt;</span>
window.<span style="color: #000066;">onload</span><span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
window.<span style="color: #660066;">location</span>.<span style="color: #660066;">href</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'#fdsafasd'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>body<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>html<span style="color: #339933;">&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://bluehua.org/2009/09/21/579.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.367 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-02-05 03:29:56 -->

