重构Web Indicator的时候发现自己一篇总结有个地方写错掉了。所以又查了资料确认下。

http://www.w3.org/2005/10/howto-favicon

1、Favicon是什么?

A favicon is a graphic image (icon) associated with a particular Web page and/or Web site. Many recent user agents (such as graphical browsers and newsreaders) display them as a visual reminder of the Web site identity in the address bar or in tabs.

2、添加Favicon的第一种方法。Use of a rel attribute value defined in a profile

The first approach for specifying a favicon is to use the rel attribute value "icon" and to define what the value means via a profile; profiles are discussed in more detail below. In this HTML 4.01 example, the favicon identified via the URI http://example.com/myicon.png as being a favicon:

  <link rel="icon"type="image/png"href="http://example.com/myicon.png">

 

3、添加Favicon的第二种方法。Putting the favicon at a predefined URI

A second method for specifying a favicon relies on using a predefined URI to identify the image: "/favicon", which is relative to the server root. This method works because some browsers have been programmed to look for favicons using that URI. This approach is inconsistent with some principles of Web architecture and is being discussed by W3C's Technical Architecture Group (TAG) as their issue siteData-36.

 

 

相关文章: