• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Favicon?

Travis

Active member
#1
How do we install a Favicon? Does it have to go in a certain folder,because I put it in the Forum Root,but no luck.
 

Peggy

Well-known member
#2
It usually does go in the forum root, and takes a few hours to show up.
Also try clearing your cache and cookies.
 

Jake Bunce

XenForo moderator
Staff member
#5
Browsers love to cache those images, so you might not see the new image in your browser if you have already bookmarked it.

Also, I often have to add a reference to the page head:

Admin CP -> Appearance -> Templates -> PAGE_CONTAINER

Code:
<!DOCTYPE html>
<html id="XenForo" class="Public {xen:if {$visitor.user_id}, 'LoggedIn', 'LoggedOut'}">
<head>
    <meta charset="utf-8" />
    <xen:if is="{$requestPaths.fullBasePath}"><base href="{$requestPaths.fullBasePath}" /></xen:if>
    
    <title><xen:if is="{$title}">{xen:raw $title} | {$xenOptions.boardTitle}<xen:else />{$xenOptions.boardTitle}</xen:if></title>
    
    <link rel="stylesheet" type="text/css" href="css.php?css=xenforo,form,public&amp;style={xen:urlencode $_styleId}&amp;d={$visitorStyle.last_modified_date}" />
    <!--XenForo_Require:CSS-->

    <xen:include template="google_analytics" />
    <xen:include template="page_container_js_head" />
    
    <xen:if is="{$pageDescription.content} AND !{$pageDescription.skipmeta} AND !{$head.description}"><meta name="description" content="{xen:string wordTrim, {xen:helper stripHtml, {xen:raw $pageDescription.content}}, 200}" /></xen:if>
    <xen:if is="{$head}"><xen:foreach loop="$head" value="$headElement">{xen:raw $headElement}</xen:foreach></xen:if>
    <LINK REL="SHORTCUT ICON" HREF="http://xenforo.com/favicon.ico">
</head>
<body>
Change the HREF appropriately.
 

Peggy

Well-known member
#6
I added your code, Jake, and changed the address of course, to mine. Right now it's showing only the XF favicon.
I'm waiting for mine to show up.
 
#10
Thanks, it helped me too.
Browsers love to cache those images, so you might not see the new image in your browser if you have already bookmarked it.

Also, I often have to add a reference to the page head:

Admin CP -> Appearance -> Templates -> PAGE_CONTAINER



Change the HREF appropriately.
 

Shyuan

Well-known member
#11
Sorry to dig this a little old post. I just uploaded my favicon to forum root. It appears to be the favicon even I did not have this line in all my forum skins' PAGE_CONTAINER templates. May I know how does my site detects the favicon? Is there any settings for it to auto detect or something? Thanks.

<LINK REL="SHORTCUT ICON" HREF="http://xenforo.com/favicon.ico">
 

Shyuan

Well-known member
#13
Hi Jake,

Thanks for your reply. But, I was wondering why my favicon is already shown? o_O (even without that line of code in my template)

Thanks.
 

MagnusB

Well-known member
#14
Most browsers autodetect the favicon in your root folder, that html is just there as a safeguard if somebody uses a browser that does not. Also, it is useful if you want to place your favicon outside of your root folder.

Browsers tend to heavily cache the favicons though, which is why you need to do a hard refresh several times before it is updated. I have even seen that hard refreshing the direct link to your favicon does not always update it.