Skip to content
Advertisement

how to add favicon to android home shortcut and mac Capitan Safari

I uses the https://realfavicongenerator.net/ to generate and check the icon, however I tried many times and couldn’t get rid of this two following errors: The Error Image

The other three are all done and the final code are below, what do I need to change to make it work?

In home.html:

JavaScript

And in my routes.py:

JavaScript

Here are the files in my main/static folder:

JavaScript

Thanks in Advance

Advertisement

Answer

So I did not really know how I made it work but this what I done: I move the head from home.html to layout.html an also add a few more line:

JavaScript

And here is my route.py file:

JavaScript

I also noticed that I forgot to implement a file in the static folder. So now the static folder looks like this:

JavaScript

I’m not sure if this is the best solution but I did know this allows users to see the favicon from android, ios, and windows devices!

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement