Parsing for shortcut icons (favicon)

Posted on 2007-08-03
Last Modified: 2010-04-16
How do you parse the shortcut icons for sites like yahoo and google when they don't seem to have a REL="SHORTCUT ICON" or an icon ending with .ico when you view source? Aren't these what IE uses to create the shortcut icons next to the link when you add a shortcut to site?

Answer in C# code would be preferable.
Question by:skyrise11
    LVL 6

    Accepted Solution

    I believe that many browsers will automatically attempt to request the file "favicon.ico" from the base directory of a given site. If it can find the file, it loads the file as the icon. If it cannot find the file, it keeps the browser's icon in its place.
    LVL 51

    Assisted Solution

    If you do not include the icon reference in the file, the browser will look in the folder containing page.

    So if there is a favicon.ico file in the root of and the pages on that folder do not have the REL='favicon.ico' file, the browser will find it.  However, if doesn't have the favicon.ico file nor does it have the REL='favicon.ico' file, then any page in that folder will not have the icon.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    bigHeights  challenge 13 43
    count11 challenge 6 35
    website content maintenance 3 47
    SQL400 max size 5 35
    A publishing tool, a Version Control System, or a Collaboration Platform! These can be some of the defining words for the two very famous web-hosting Git repositories: Bitbucket and Github. Git is widely used amongst the programmers and developers f…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
    In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now