Skip to content

Commit

Permalink
Fix displaying the number of unread entries in the favicon for Chrome.
Browse files Browse the repository at this point in the history
Currently favico.js has a bug which only updates the last element with rel="icon" if there are several in the page head. This maeans that the favicon must be last in the head, particularly it must appear after the 192x192 icon (used in the mobile manifest).

Related to this favico.js bug, might become unnecessary when it is fixed:

  ejci/favico.js#85
  • Loading branch information
amatriain committed Jan 26, 2016
1 parent 688f94e commit 8e5de41
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/views/layouts/_header.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<%= favicon_link_tag '/favicon.ico' %>
<% end %>
<%= stylesheet_link_tag 'application', :media => 'all' %>

<link rel="icon" sizes="192x192" href="<%= image_path 'feed192x192.png' %>">
<link rel="manifest" href="<%= page_path 'manifest.json' %>">
<meta name="theme-color" content="#FFA500">
<%= csrf_meta_tags %>
<%# favicon must be the last element with rel="icon", otherwise favico.js won't work %>
<%= favicon_link_tag '/favicon.ico' %>
</head>

0 comments on commit 8e5de41

Please sign in to comment.