1. 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

Discussion in 'XenForo Questions and Support' started by lazer, Jul 7, 2013.

  1. lazer

    lazer Well-Known Member

    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?
  2. nodle

    nodle Well-Known Member

    Normally you just place your favicon in the root on your web folder. Your .htaccess shouldn't matter.
  3. lazer

    lazer Well-Known Member

    Thanks nodle, I know where the favicon goes :) So, to answer my question..?
  4. nodle

    nodle Well-Known Member

    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?
  5. lazer

    lazer Well-Known Member

    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.
  6. CyclingTribe

    CyclingTribe Well-Known Member

    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. :)
  7. lazer

    lazer Well-Known Member

    I believe it was picked up from an online analyzer Shaun, possible Pagespeed Insights.

    @Jake Bunce did my .htaccess ;)
  8. MagnusB

    MagnusB Well-Known Member

    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.
  9. CyclingTribe

    CyclingTribe Well-Known Member

    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: Jul 8, 2013
    lazer likes this.
  10. lazer

    lazer Well-Known Member

    In that case, I'll add a copy of the favicon in the site root...
    CyclingTribe likes this.
  11. CyclingTribe

    CyclingTribe Well-Known Member

    If you're only ever going to use one favicon for the whole site - move it to the root - that's where it should live anyway. ;)
    lazer likes this.
  12. lazer

    lazer Well-Known Member

    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


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

    Which would be better?
  13. CyclingTribe

    CyclingTribe Well-Known Member

    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:)
  14. lazer

    lazer Well-Known Member

    Yep, I think that's the better option...
    CyclingTribe likes this.

Share This Page