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

XF 1.1 Change Favicon path

lazer

Well-known member
#1
Hey all

I have an .htaccess rule, so that all URL's have "www." applied to them.

I noticed that the path to my favicon does not have the "www." so would like to change it.

Is there any downside to changing the path to the favicon, considering I have the .htaccess rule applied?
 

nodle

Well-known member
#2
Normally you just place your favicon in the root on your web folder. Your .htaccess shouldn't matter.
 

nodle

Well-known member
#4
Like I said there is nothing that you need to do, it's not dependent on your your .htaccess file. It doesn't matter if you use a www or non-www site. Since it's sits in your root folder whatever way you want your site displayed it just picks up the favicon. As far as I know there is no "path" since it's at your root. Unless you are doing something special? You are talking about your favicon.ico that displays before your web address correct?
 

lazer

Well-known member
#5
We're trying to clean up load times and the re-direct of the favicon (for what it's worth) from non-www to www is flagged as a possible time saver.
 

CTXMedia

Formerly CyclingTribe
#6
Where did you notice it doesn't have the www in the path? GWT?

Also, can you post your .htaccess in case the rewrite needs a tweak. :)
 

MagnusB

Well-known member
#8
favicos are something browsers are caching extremely hard. I have had to hard refresh 5 - 10 times before changes appear in the past, though it seems to be better now. My experience is that I just keep it in my root folder and it seems to work 99% of the time, and if it doesn't, it doesn't.
 

CTXMedia

Formerly CyclingTribe
#9
Your favicon.ico file appears to be in the /xf sub-directory - it should be in the root.

Additionally, when I try to query the file from the root location - I'm redirected to your forum home at /xf

It looks like you either need to move the file or review the rewriting ... (y)
 
Last edited:

lazer

Well-known member
#12
Having thought a bit more about this...

If I specify a favicon in the document header, the browser will load it early. If you don't specify a favicon, most browsers will automatically attempt to guess at it - they'll try looking for favicon.ico in the doc root. They do this after everything else has loaded though.

So by not explicitly linking to a favicon, apparent performance can improve slightly (because the favicon is loaded at the end, after the rest of the page).

As I see it, I have two choices:

1) Copy the favicon to my doc root, and get rid of:

<LINK REL="SHORTCUT ICON" HREF="http://xxxxx.com/xf/favicon.ico"> in the template

OR

2) Change the link in the template to use http://www.xxxxx.com/xf/favicon.ico

Which would be better?
 

CTXMedia

Formerly CyclingTribe
#13
Put it in the root and remove the link rel. (y)

Performance wise you'd have to be on a pretty low-rent server for a favicon to have an impact ... :D (but speaking from experience of spending months knocking milliseconds off've page loads, I can understand the question; and if we're "doing the math" - you'll save a few bytes for each page load by removing the link rel from the HTML ... :LOL:)