DEV Community

Cezary Tomczyk
Cezary Tomczyk

Posted on

What's the difference between shortcut icon and just icon?

We still asking ourselves: should we use rel="shortcut icon" or rel="icon" or both for our favicon?

Example code

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

Solution

Avoid rel="shortcut icon" and use only rel="icon".
According to MDN and rel attribute documentation:

The shortcut link type is often seen before icon, but this link type is non-conforming, ignored and web authors must not use it anymore.

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay