favicon

Will browsers request /favicon.ico or <link> first?

故事扮演 提交于 2019-11-28 10:10:41
I want to set a favicon to be requested from a static file server instead of the main web server for performance optimization. If I specify a <link rel="shortcut icon" href="http://cdn.site.com/favicon.ico"> but also have a /favicon.ico in my site root as a fallback, which will browsers prefer? Will browsers (and which?) still look for /favicon.ico , making the move to a static file server useless? I did the test suggested above. I placed a /favicon.ico in the root of a domain, and a link, and fired up the page in: Opera 10 Opera 9.64 Firefox 3.5 IE 6 IE 7 IE 8 Safari 4 They all showed the

Display favicon for PDF files

你。 提交于 2019-11-28 07:19:04
问题 I am working on a Drupal site with some PDF files where I am opening a PDF file in a new window. The files are getting opened in the browser with the Acrobat Reader plugin but the favicon is not getting displayed. What should be done to show the favicon? 回答1: If you show the PDF file in an iframe , the browser should show the site-wide favicon, but you're out of luck in an external applications. Acrobat Reader doesn't use Favicons. UPDATE This is now possible by placing favicon.ico in the

Add favicon to JSF project and reference it in <link>

烂漫一生 提交于 2019-11-28 04:57:30
How do I add a favicon to a JSF project and reference it in <link> element? I tried as below: <h:head> <link rel="icon" type="image/x-icon" href="images/favicon.ico"/> ... </h:head> However, it didn't show any favicon. BalusC A relative href is relative to the current request URI. Likely it resolved to an invalid URL. You need to prepend with the context path so that it becomes relative to the domain root. Also, the rel has better to be shortcut icon to get it to work in older browsers too. In case of using an .ico file, you also need to ensure that it's a real .ico file and not some .bmp

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

走远了吗. 提交于 2019-11-28 04:49:37
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. Should I remove the keyword shortcut from this tag throughout my Website? From the same WHATWG document:

How to get a website's favicon with PHP?

亡梦爱人 提交于 2019-11-28 04:45:59
I want to get, requested website's favicon with PHP. I have been recommended using Google's favicon service but it is not functional. I want to do something on my own but don't know regex usage. I found a class on Google that works on most cases but it has unacceptable error rate. You can have a look here: http://www.controlstyle.com/articles/programming/text/php-favicon/ Can somebody please help me about getting favicon using regex, please? PHP Grab Favicon This is a comfortable way with many parameter to get the favicon from a page URL. How it Works Check if the favicon already exists local

favicon won't show up in chrome but show up in other browsers like IE, Firefox

拟墨画扇 提交于 2019-11-28 04:07:01
问题 I have the html: <link rel="shortcut icon" href="/images/favicon_muse_me.ico"> on my website Muse Me (http://www.musememobile.com) The favicon won't show up if I open it with Chrome. It shows up in other Browsers. The favicon showed up before in Chrome but then I changed it. What should I do to make it show up in Chrome? 回答1: Add the ICO file to the root directory as 'favicon.ico'. 回答2: Some browsers disregard the favicon metatag, and just look for /favicon.ico. 回答3: Chrome does not support

How to set favicon.ico properly on vue.js webpack project?

寵の児 提交于 2019-11-28 03:44:40
I have created a vue webpack project using vue-cli . vue init webpack myproject And then ran the project under dev mode: npm run dev I got this error: Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/favicon.ico So inside webpack, how to import the favicon.ico correctly? Mani Check out the Project Structure of webpack template: https://vuejs-templates.github.io/webpack/structure.html Note that there is a static folder, along with node_modules , src , etc. If you put some image into the static folder, like favicon.png , it will be made

Get website's favicon with JS

こ雲淡風輕ζ 提交于 2019-11-28 02:59:21
I am wondering if it is possible to get a website's favicon by an URL with JavaScript . For example I have an URL http://www.bbc.co.uk/ and I would like to get path to favicon described in <link rel="icon" .../> meta tag - http://www.bbc.co.uk/favicon.ico . I have many URLs so that should not load every page and search for link tag I think. Any ideas ? You could use YQL for that http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%3D"http://bbc.co.uk/"and%20xpath%3D"/html/head/link[@rel%3D'icon']%20|%20/html/head/link[@rel%3D'ICON']%20|%20/html/head/link[@rel%3D

Dynamically generated favicon

橙三吉。 提交于 2019-11-28 02:59:20
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 similar to this using only JavaScript and HTML: ====================== ====XXXXXXXXXXXXXX==== ====X===

Dynamic favicon using image manipulation similar to Gmail adding a count

蹲街弑〆低调 提交于 2019-11-28 02:50:14
I tried to figure it out looking at the source code but I couldn't figure it out. I would like to know how to make a dynamic favicon with a count like Gmail does. Any idea on how to do this? You can make an image with the canvas element, and then just replace the current favicon. Check out the following link for a good explanation on it. Reference Code is from the above reference. Markup <link id="favicon" rel="icon" type="image/png" href="image.png" /> JS (function () { var canvas = document.createElement('canvas'), ctx, img = document.createElement('img'), link = document.getElementById(