Freigeben über


SharePoint and the favicon

Setting a page’s favicon is pretty easy in 2010:

 <SharePoint:SPShortcutIcon runat="server" IconUrl="/_layouts/images/favicon.ico"/>

Now try this with an icon coming from the Style Library:

 <SharePoint:SPShortcutIcon runat="server" IconUrl="/Style Library/favicon.ico"/>

You think you have nailed it, right? Fire up IE8 running on XP and you’ll see it won’t appear.

Here’s the fix:

 <SharePoint:SPShortcutIcon runat="server" IconUrl="/Style%20Library/favicon.ico"/>

Took me some time to figure out…

Comments

  • Anonymous
    April 11, 2012
    As a best practice, setting a custom favicon for a site requires creating a new master page instead of using the standard one provided by SharePoint, right?
  • Anonymous
    April 11, 2012
    I'm not aware of an other way, so yes.