Confusing icons/favicons - icons

enter image description herePeople say that you can make an icon for a website tab simply with <link rel="shortcut icon" type="image/x-icon" href="img/bookIcon.ico"> but whenever I do that it doesn't show anything up in the tab, just the default earth symbol (I'm using chrome, that may be it) and the title.

ok, I figured it out: the file wasn't in the "img" folder. oof.

Related

FavIcon issue in springMVC

Our Fav icon is placed in different url and we added below link in the header jsp.
<link rel="shortcut icon" type="image/x-icon" media="all" href="/siteid/_ui/responsive/theme/images/favicon.ico" />
but still browser is searching as www.sitename.com/favicon.ico randomly mainly in google chrome. This is causing the user session out issue in springs.
Any suggestions.
Thanks,
Sreenivas A.
I think to problem is you are missing the parent directory.
Try this
href="~/siteid/_ui/responsive/theme/images/favicon.ico" />
or
href="../siteid/_ui/responsive/theme/images/favicon.ico" />

How to extract the title image of the web page

I want to extract the title image of a web page using C# in ASP.NET. I checked the windows and document objects but they don't have a property such as title. So searching for method to extract the title image like in the page tab of the Chrome.
using (WebClient client = new WebClient())
{
Byte[] favico = client.DownloadData("http://msite.com/favico.ico");
}
That's using WebClient.DownloadData. You can also use WebClient.DownloadFile if you're looking to store it.
A further bullet-proofed approach would be to download the index page and use an HTML parser to look for the <link> tag that specifies where the icon is supposed to be (could also be applied to apple-touch-icon or otherwise).
BTW, the tags I believe you're looking to parse are:
<!-- StackOverflow's implementation: -->
<link rel="shortcut icon" href="http://cdn.../favicon.ico">
<link rel="apple-touch-icon" href="http://cdn.../apple-touch-icon.png">
<!-- Google's implementation: -->
<meta content="/images/google_favicon_128.png" itemprop="image">
<!-- Facebook's implementation: -->
<link href="http://static.ak.fbcdn.net/.../q9U99v3_saj.ico" rel="shortcut icon">
There is no such a thing as "title image" in HTML specifications. The icon you see in the tab or near the URL in some browser is specified using <link rel="icon"/> construct:
<link type="image/x-icon" href="/images/favicon.ico" rel="icon" />
IE may rquire you to use a slightly different syntax:
<link type="image/x-icon" href="/images/favicon.ico" rel="shortcut" />
Parse the page - and retrieve the value of href attribute - this is the path of the icon.
Note also, that IE version 8 and below ignore this line completely and instead look for file favicon.ico in the root of the site. See this somewhat old article for more information on IE.

How to display image on URL bar

I want to display an image and some text on the URL bar of browser.
I am able to display an image by using tag <link type="image/x-icon" href="../../images/iconFav.bmp" rel="shortcut icon" /> but could not show text beside the image.
What actually I wanted to do is just like stackoverflow shows an image on URL bar, I would like to show an image and few text :)
Otehr example would be to have a look at https://developers.facebook.com/docs/reference/fql/ which displays an image and facebook.com beside that image on URL bar
That text (displayed next to the favicon.ico) is the HTML title element:
<html><head><title>Your text here</title></head></html>
That favicon isn't displaying because BMP is not a supported favicon file format. For the best support use an ICO file. See: http://en.wikipedia.org/wiki/Favicon#File_format_support
You can use Favicon.co.uk to convert your image to ICO format if you like
Then link to it like this:
<link href="/location/of/favicon.ico" rel="shortcut icon" />
Then for the title use <title>Your Title</title> inside the <head> tag
You need to read up on favicons. Also ensure your using the right doctype with the right fav icon link. You need to convert your favicon to a ico file with a converter: I prefer this one: http://www.prodraw.net/favicon/index.php
I think what you're referring to is the SSL extended validartion information. Modern browsers display sites running under HTTPS with the domain in blue or green (depending on the type of SSL certificate purchased).
More details about extended validation are available at http://en.wikipedia.org/wiki/Extended_Validation_Certificate but effectively it's not possible to control the text - it's either the domain of your site e.g. facebook.com or the name of your organisation e.g. "PayPal Inc." and requires an SSL certificate to be purchased and is only shown on your website when browsed using SSL.
It can't be done. On https sites, some browsers will put things beside the image (the site name) to show that you are visiting the site in a secured way, but there is no way that a programmer can control this, it's built into the browser. You can control the favicon image, that's all.
I think that text appears if the site is secure and verified by some organisation. But I was able to display the image on location bar by using <link type="image/x-icon" href="../../images/iconFav.bmp" rel="shortcut icon"/>

XHTML Favicon - proper usage

What is the proper way to have a favicon for a website in XHTML?
1.Does it have to be .ico or can it be .gif or .png?
2.Is this the proper code for embedding and rel value:
<link rel="shortcut icon" href="http://yoursitedotcom.here/favicon.ico"/>
3.Does the favicon file have to reside in the root of the site or it can be anywhere and correctly specified in the link href attribute?
4.Anything else?
Thank you.
1.Does it have to be .ico or can it be .gif or .png?
ya it can be gif or png too, but standard is ico
2.Is this the proper code for embedding and rel value:
<link rel="shortcut icon" href="http://yoursitedotcom.here/favicon.ico"/>
this is correct
3.Does the favicon file have to reside in the root of the site or it can be anywhere and correctly specified in the link href attribute?
it can be any where as long as path is correct
4.Anything else?
google for any thing else
you can find a table for compatibilty of datatypes/browsers on wikipedia. the favicon can be located in a subfolder if you specify the correct path in your link-tag. and: yes, your code is ok (more about the link-tags on the wikipedia-article, too).

How to open a form on fav-icon click?

<link rel="shortcut icon" href="favicon_012423/favicon.ico"/>
<link rel="icon" type="image/gif" href="favicon_012423/animated_favicon1.gif" />
I want to pop up or open a new form on the click of a fav-icon. Can anybody help me out with this? Thanks
you can't open a link off of a favicon... favicons are outside your markup and thus you cannot add an anchor tag to it.
It is impossible because FavIcon is not a part of your code.
Your icon just download to users computer and then his/her browser try to use it in its own way.

Resources