0

I'm trying to modify the Xampp favicon and it's being impossible.

At first I changed the xampp default favicon htdocs/favicon.ico, and It still showing the orange "X".

Then I thought it could be the configuration of my symfony project. So I went to myProyect/web and overwrited the symfony favicon.ico with mine. I have to clarify that before I made this, it didn't show the "SF" black favicon.

And tryed to add the fav icon line to both "base.html.twig" and "layout.html.twig":

<link rel="shortcut icon" href="{{ asset('favicon.ico') }}" />

And also tryed this:

<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />

The favicon file is located in-> htdocs/MyProyect/web/favicon.ico

But I have no clue why is still showing the Xampp default icon... I have erased symfony cache, and both chrome and firefox cache, and still doesn't work.

I'll apreciate some help with this, I'm a Symfony noob and some parts of it is driving me crazy.

Thank to you all.

Franco
  • 35
  • 1
  • 3
  • 10
  • Have you tried another browser you never use. I always have this issue with Favicons and have to use say Safari to confirm it is working. I understand you have cleared the cache of you other browsers, but the fact that you have changed the default xampp favicon and it still appears makes me think this. – The Humble Rat Feb 14 '14 at 16:13
  • is the path in the generated html correct? did you reload the page with [SHIFT] + [F5] or what ever to reload without reading from cache? – ferdynator Feb 14 '14 at 16:16
  • @ferdynator CTRL + F5 on Windows – The Humble Rat Feb 14 '14 at 16:18
  • I have just replaced the favicon in htdocs, still showing in Chrome as the original, but Firefox is now showing me the right one. Not matter how many times I refresh, chrome continues to show me the wrong one. – The Humble Rat Feb 14 '14 at 16:23
  • 1
    See this link http://stackoverflow.com/questions/2208933/how-do-i-force-a-favicon-refresh – The Humble Rat Feb 14 '14 at 16:25
  • @The-Humble-Rat Of course I had tested it with other browser (Firefox) even with the useless IE. And I always use CTRL+F5 to refresh + erase cache in both browsers. But I think is something related with Xampp installed services, because when I go to the Xampp folder and overwrite xampp icon with mine, the preview of the icon changes again for the xampp one O_o''... is crazy. I remember it happened to me when I used xampp a few years ago, but I can't remember how I made it out. – Franco Feb 17 '14 at 08:22
  • for the record, I made the changes even stopping and closing xampp in windows. – Franco Feb 17 '14 at 08:26
  • I feel like an idiot... even erasing all cache and all this stuff. I made it with this: 1. type in www.yoursite.com/favicon.ico 2. push enter 3. ctrl+f5 4. done 5. Restart Browser (IE) – Franco Feb 17 '14 at 08:37
  • Thanks to the-Humble-Rat source, the second choosed comment: [link]http://stackoverflow.com/questions/2208933/how-do-i-force-a-favicon-refresh – Franco Feb 17 '14 at 08:38

1 Answers1

7

Your favicon should be in web folder root. If not loading new favicon then use query string like this.

<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}?v=2" />
Zaheer Babar
  • 1,636
  • 1
  • 15
  • 17