We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5210
    • 43 Posts
    Hi all,

    I’ve read through posts on this forum as well as articles found via a Google search regarding changing a site’s favicon. I think I’ve done as recommended, but the new icon doesn’t seem to want to appear in the address bar, even after clearing the cache and/or a hard refresh (Ctrl+F5).

    I can browse to the icon (www.sitename.com/favicon.ico) and view it, and it is the changed icon file.

    I’ve added the following lines to the <head> tag of the template:

    <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
    <link rel="icon" type="image/x-icon" href="/favicon.ico" />


    I’ve also tried just the filenames without the slash, as well as an explicit path (http://www.sitename.com/favicon.ico).

    I must be doing something wrong, but I just can’t figure it out.

    Help?!

    Thanks,

    Chris
      • 4310
      • 2,310 Posts
      <link rel="shortcut icon" href="/assets/icons/favicon.ico" />
      

      Works for me smiley
        • 16183
        • 1,390 Posts
        Just guessing here......I have read that referencing the favicon is different in xhtml and html....

        http://www.w3.org/2005/10/howto-favicon

        Have you checked to see that your link matches the doctype?

        Here’s a favicon validator in case you haven’t seen it already

        http://www.html-kit.com/favicon/validator/

        cheers/k
          • 5210
          • 43 Posts
          Thanks for the validator kongondo! It seems that my code and image files are ok. I guess I just need to restart my browser...

          Chris
            • 3749
            • 24,544 Posts
            Quote from: chrison600 at Jan 11, 2009, 05:20 PM

            Thanks for the validator kongondo! It seems that my code and image files are ok. I guess I just need to restart my browser...

            Chris

            Are you using Chrome by any chance. I just learned from another poster that it doesn’t clear the browser cache unless you shut it down.
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 5210
              • 43 Posts
              Firefox 3. But it also appears to not be able to reload a favicon unless you restart it, even after manually clearing the cache and/or a hard refresh (Ctrl+F5), even when it’s obvious that it is reloading page images...

              Chris
                • 16183
                • 1,390 Posts
                Quote from: chrison600 at Jan 12, 2009, 08:12 AM

                Firefox 3. But it also appears to not be able to reload a favicon unless you restart it, even after manually clearing the cache and/or a hard refresh (Ctrl+F5), even when it’s obvious that it is reloading page images...

                Chris

                Strange indeed.....

                Have you tried to test your favicon on a static site? What about on a local modx site (xampp, wamp, etc)?

                cheers/k
                  • 22851
                  • 805 Posts
                  I once encountered a similar problem. It turned out that I was serving the .ico file with a different mime type to the one I was declaring in the head section. From Firefox you can use the Live Http Headers addon to check what mime type you are serving the favicon as.

                  It’s possible that you are serving with the correct mime-type: image/vnd.microsoft.icon, but declaring it in the code as something different. Some browsers, like firefox, don’t like that.
                    YAMS: Yet Another Multilingual Solution for MODx
                    YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
                    Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.
                    • 5210
                    • 43 Posts
                    Interesting. I loaded the Live HTTP Header plugin. It seems to process the page load ok, but I don’t see any .ico items in the Header item list...

                    Upon restarting Firefox, the icon image showed as intended in the address bar and on the page tab. Should I also see the .ico file listed in the Header scan list?? I see JPGs and GIFs, and my CSS file, etc, but no .ICO...

                    ??

                    Chris
                      • 22851
                      • 805 Posts
                      Just browse to your favicon. (Something like http://yoursite.com/favicon.ico) Then right click on the background and select "Page Info...". Select the Live Headers tab. In the Response Headers window, take a look at the value of the "Content-Type" field. It should match with the content type specified in your (x)html head section.
                        YAMS: Yet Another Multilingual Solution for MODx
                        YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
                        Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.