Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github Pages website favicon not showing

I'm hosting a website using Github Pages. I connected Cloudflare to the website because of SSL. When i finally added favicon.ico to my website and the following code in <head> to make the favicon show up, it still doesn't show up. What can i do?

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

(english is not my native language)

Edit: Seems like other people can see the favicon, except me. But why?

like image 684
SMix Avatar asked Sep 11 '17 19:09

SMix


People also ask

Why is my favicon not showing up on my website?

Your browser has cached your site as one without a favicon When you add a favicon to your site, it may not show up since your browser has 'saved' your site as one without a favicon. You need to clear the cache in your browser or use a different browser.

Why is GitHub pages not showing my website?

GitHub Pages sites aren't able to be hosted from private repositories when you're on the free plan. When you change your repositories visibility settings any Pages sites hosted from this repository will be disabled.

Where are favicons displayed?

Short for “favorite icon,”' favicons are commonly displayed on tabs at the top of a web browser,—but they're also found on your browser's bookmark bar, history and in search results, alongside the page url. In some instances, such as on Google Chrome, favicons will even make an appearance on your browser's homepage.


1 Answers

I have had the exact same problem. I was able to solve it by including a ? in the end.

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

I am not exactly sure why adding in ? works but the code below does not.

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

like image 169
Ray Li Avatar answered Oct 13 '22 01:10

Ray Li