html – Put an icon in a website shortcut on Android

Question:

Hi, I have the following question, I have my website, fully responsive, and for some of our customers, we've put a shortcut to the website on their mobile via Google Chrome. The shortcut works but it's a completely random icon in relation to my website.

I want it to work like Tecmundo, Globo.com, all these sites, when we're going to add a shortcut to them on the cell phone, it already has the site's icon.

I did this but it didn't work.

   <link type="image/ico" href="images/favicon.ico"/>

It works on the computer normally showing the icon up there next to the title.

SOLUTION

    <link href="images/favicon.ico" type="image/x-icon" />
        <!-- Opera Speed Dial Favicon -->
  <link type="image/png" href="images/icon/favicon.png" />
    <!-- Standard Favicon -->
  <link type="image/x-icon" href="images/icon/favicon.ico" />
    <!-- For iPhone 4 Retina display: -->
  <link sizes="114x114" href="images/icon/apple-touch-icon-114x114-precomposed.png">
    <!-- For iPad: -->
  <link sizes="72x72" href="images/icon/apple-touch-icon-72x72-precomposed.png">
    <!-- For iPhone: -->
  <link href="images/icon/apple-touch-icon-57x57-precomposed.png">

Answer:

If the image you are going to insert is of the .ico type, you must set the type to image/x-icon . See below:

<link href="images/favicon.ico" type="image/x-icon" />

For other image formats like .png and .gif , see below how it should be:

<link type="image/png" href="images/favicon.png" />
<link type="image/gif" href="images/favicon.gif" />

To register, I left a favicons.html file on Github . See also more details in these favicons examples (en) .

Scroll to Top
AllEscort