How to add favicon to a mobile page.

Rate It (1)

Last post 06-29-2009 7:45 AM by Bullonprowl. 3 replies.

Sort Posts:

  • How to add favicon to a mobile page.

    06-26-2009, 12:56 PM
    • Member
      point Member
    • Renjith.M.P
    • Member since 06-26-2009, 4:48 PM
    • Posts 2

    Hi All,


    I want to know how to add favicon to a mobile page. I have created a sample web application(.net 2.0 ,c#) . I have added this code  <link rel="shortcut icon" type="image/gif" href="http://find.mobi/favicon.gif" />  in head tag. This is working fine, if I inherit my class from "System.Web.UI.Page".

    but not working, if I inherit from System.Web.UI.MobileControls.MobilePage .Can any one tell suggest any reason or solution for this ? 

    I need server side code to implement this .


  • Re: How to add favicon to a mobile page.

    06-26-2009, 8:35 PM
    Answer
    • All-Star
      33,913 point All-Star
    • vcsjones
    • Member since 04-18-2006, 8:53 PM
    • Falls Church, VA
    • Posts 4,331
    • Moderator
      TrustedFriends-MVPs

    That should work - but mind you that a favicon is a browser feature. Not all browsers implement a favicon in a mobile device. Windows Mobile doesn't support it, and nor does Safari on the iPhone.

    Cheers,
           Kevin Jones


  • Re: How to add favicon to a mobile page.

    06-27-2009, 2:24 PM
    • Member
      point Member
    • Renjith.M.P
    • Member since 06-26-2009, 4:48 PM
    • Posts 2

    Ya. I agree  . But my code neither working in firefox nor in devices . Can you share a working code with me . Both aspx and code behind.

  • Re: How to add favicon to a mobile page.

    06-29-2009, 7:45 AM
    Answer
    • Member
      332 point Member
    • Bullonprowl
    • Member since 08-16-2005, 6:04 AM
    • Chennai
    • Posts 87

    Hi Renjith,

    Your implementation is correct. But you dont have to refer it any where in your code. You just need to have a "favicon.ico" (In IIS. dont know about other webservers) at the root level/folder of your website. Just Make sure you follow the below mentioned image formats to get FavIcons on Supported Mobile Devices (Blackberry, Nokia E75, SonyEricsson M600i and other high end phones).

    For FavIcon, the image need to be like (this is how i rendered the Fav icon for both Desktop and Mobile phone browsers)

    1) 16x16 size. 16 colours (4 Bit) or 256 colours (8 Bit)

    AND

    2) 32x32 size. 16 colours (4 Bit) or 256 colours (8 Bit)

    <link rel="Fav Icon" href="/favicon.ico" type="image/vnd.microsoft.icon">
    <link rel="icon" type="image/gif" href="http://www.yoursite.com/favicon.gif" />


    Both the above tags should work in mobile as well as in Desktop Browsers. Just follow the Image size and resolutions.

    
    										                
    										                
                									    
    Regs,
    Bharani

    Please mark this post as "Answer" if it helped to solve your problem, so that others can also find it usefull while searching.
Page 1 of 1 (4 items)