3

I am reading the book: Flask Web Developmen. Below are the book's codes for adding an icon in the address bar:

{% block head %}
{{ super() }}

<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}" 
type="image/x-icon">
<link rel="icon" href="{{ url_for('static', filename='favicon.ico') }}"
type="image/x-icon">

{% endblock %}

My question is: why it needs two links to add one icon. In HTML, this oneline <link rel="shortcut icon" href="static/favicon.ico"> is enough for this task. Doesn't it?

Bicheng
  • 687
  • 8
  • 20
  • It is, But the shortcut icon is just there for [(see this SO post)](https://stackoverflow.com/questions/25952907/favicon-ico-vs-link-rel-shortcut-icon) – Michael Ilie Mar 26 '18 at 02:59

1 Answers1

3

To answer your question: Yes, Yes it is enough. However shortcut icon is for things like Desktop shortcuts or I think even ios Shortcuts. See This So Post

Michael Ilie
  • 449
  • 2
  • 16