favicon

HTML5 `<link rel=“shortcut icon” />`

廉价感情. 提交于 2019-11-27 00:40:47
问题 The WHATWG document for HTML5 says that the rel attribute must contain values that are space-separated, and then it gives a table of allowed values. The attribue's value must be a set of space-separated tokens. The allowed keywords and their meanings... The list of allowed keywords for the link element does not include shortcut , but it does include icon . So I'm looking at the all-too-well-known tag <link rel="shortcut icon" href="/favicon.ico" /> and wondering if it is HTML5-compliant.

How to set-up a favicon?

不羁的心 提交于 2019-11-27 00:26:11
问题 I am trying to do a very simple preliminary exercise to setting up a website which is creating a favicon. This is the code I am using: <!DOCTYPE html > <html lang="en-US"> <head profile="http://www.w3.org/2005/10/profile"> <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" /> </head> </html> But it is not working - can anyone please assist? I've saved the file favicon.ico on the same level as my html file (on a subdirectory). Many thanks 回答1: With the introduction of (i|android

Dynamically generated favicon

元气小坏坏 提交于 2019-11-26 23:54:42
问题 Would it be possible using only JavaScript and HTML to dynamically generate a favicon, using the current page's favicon as a background, and a random number in the foreground? For example, lets say the current favicon looks similar to this: ====================== ====XXXXXXXXXXXXXX==== ====X================= ====X================= ====X=====XXXXXXXX==== ====X============X==== ====X============X==== ====XXXXXXXXXXXXXX==== ====================== If possible, how would I get it to look something

Image icon beside the site URL

家住魔仙堡 提交于 2019-11-26 23:27:54
问题 I would like to have information about the icons which are displayed alongside the site URLs on a web browser. Is this some browser specific feature? Where do we specify the icon source, ie, is it in some tag on the web page itself ? 回答1: These icons are called favicons Most web browsers support http://mysite.com/favicon.ico but the proper way to do it is to include an icon meta tag in the head profile. <head profile="http://www.w3.org/2005/10/profile"> <link rel="icon" type="image/png" href=

favicon not working in IE

*爱你&永不变心* 提交于 2019-11-26 22:37:59
I have a site using a custom favicon.ico. The favicon displays as expected in all browsers except IE. When trying to display the favicon in IE, I get the big red x; when displaying the favicon in another browser, it displays just fine. The page source includes and it does work in other browsers. Thanks for your thoughts. EDIT: SOLVED: The source of the issue was the file was a jpg renamed to ico. I created the file as an ico and it is working as expected. Thanks for your input. Right you've not been that helpful (providing source would be have been really useful!) but here you go... Some

HTML 5 Favicon - Support?

*爱你&永不变心* 提交于 2019-11-26 21:13:49
I was reading the Favicon page on Wikipedia. They mention the HTML 5 spec for Favicon: The current HTML5 specification recommends specifying size icons in multiple sizes using the attributes rel="icon" sizes="space-separated list of icon dimensions" within a tag. [ source ] Multiple icon formats, including container formats such as Microsoft .ico and Macintosh .icns files, as well as Scalable Vector Graphics may be provided by including the icon's content type in the form of type="file content-type" within the tag. Looking at the cited article (W3) they show this example: <link rel=icon href

Set window icon

*爱你&永不变心* 提交于 2019-11-26 18:51:46
When I tried to change the window icon in the top left corner from the ugly red "TK" to my own favicon using the code below, Python threw an error: from tkinter import * root = Tk() #some buttons, widgets, a lot of stuff root.iconbitmap('favicon.ico') This should set the icon to 'favicon.ico' (according to a lot of forum posts all over the web). But unfortunately, all this line does is throw the following error: Traceback (most recent call last): File "d:\ladvclient\mainapp.py", line 85, in <module> root.iconbitmap(bitmap='favicon.ico') File "C:\Python33\lib\tkinter\__init__.py", line 1637, in

Necessary to add link tag for favicon.ico?

痴心易碎 提交于 2019-11-26 18:49:24
问题 Are there any modern browsers that won't detect the favicon.ico automatically? Is there any reason to add the link tag for favicon.ico? <link rel="shortcut icon" href="/favicon.ico"> My guess is that it's only necessary to include it in the HTML document if you decide to go with GIF or PNG... 回答1: To choose a different location or file type (e.g. PNG or SVG) for the favicon: One reason can be that you want to have the icon in a specific location, perhaps in the images folder or something

How to have favicon / icon set when bookmarklet dragged to toolbar?

混江龙づ霸主 提交于 2019-11-26 18:47:47
问题 I've made myself a bookmarklet, and it functions just fine, but when added to a toolbar in Opera or Firefox, it just takes on the default bookmark icon for the browser (a globe and a star, respectively). My site has a favicon, and the window, tab and even [site] bookmark uses the favicon I've specified. Just not my bookmarklet. How can I code my site or bookmarklet so that the bookmarklet gets the favicon, too? I'm aware of various manual hackery techniques users can use to set the favicon

Favicon: .ico or .png / correct tags? [duplicate]

房东的猫 提交于 2019-11-26 17:54:25
问题 This question already has an answer here: favicon.png vs favicon.ico - why should I use PNG instead of ICO? 8 answers In a HTML5 document, which favicon format do you recommend and why? I want it to be supported by IE7 and all the modern browsers. Also, when using .png, do I need to specify the type (type="image/png")? 回答1: For compatibility with all browsers stick with .ico . .png is getting more and more support though as it is easier to create using multiple programs. for .ico <link rel=