1

I'm having a pretty absurd issue every where EVERY new Django project I create is utilizing an old favicon that I made a long time ago. In other words, all new Django projects have this old favicon and I have no idea how or why its accessing it.

Any ideas?

1 Answers1

0

There are two points to consider:

How you access your sites under development

If you use a generic URL such as http://localhost, your browser considers all your sites to be the same one. Thus, you suffer from cross-site caching issues. If so, you can try the well-known solutions described in How to force a favicon refresh. An alternative solution is to use you hosts file (/etc/hosts on Linux or C:\Windows\System32\drivers\etc\hosts on Windows). Add lines such as:

127.0.0.1 myfirstsite.com
127.0.0.1 mysecondsite.com

Then, browse your sites under development just like a regular site with http://myfirstsite.com or http://mysecondsite.com.

Duplicated favicon(s)

Is there any chance your icons are duplicated?

  • Maybe you have duplicated declarations in your HTML. Some browsers may use the first one, some others the second one.
  • Maybe you have a duplicated favicon in your root directory (ie. http://example.com/favicon.ico). This is a convention, so some browsers may pick this one instead of the one you declared in the HTML.
Community
  • 1
  • 1
philippe_b
  • 35,837
  • 7
  • 53
  • 51
  • Thanks. I'll give them a shot. I deleted the Favicon folder in Chrome but that didn't seem to solve the issue. I did notice something weird though. When I go to Django's default server URL (http://127.0.0.1:8000/), I see the favicon. However, when I just go to localhost:8000, I DON'T see the favicon. Hopefully this will help me pinpoint the issue! – oakesonline Jul 19 '16 at 16:41