angular/angular-cli

Replace favicon.ico in favor of png in src/assets

Open

#11,275 opened on Jun 17, 2018

View on GitHub
 (9 comments) (8 reactions) (0 assignees)TypeScript (26,585 stars) (11,999 forks)batch import
area: @schematics/angularfeaturefeature: insufficient voteshelp wanted

Description

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x] feature request

Area

- [ ] devkit
- [x] schematics

Desired functionality

favicon.ico is outdated and obsolete relic from the 90s. Browsers for the past 2decades have supported png favicons. Additionally, while it's fairly easy now to generate a favicon.ico, it's just not needed or used anymore.

There's no reason imo to include favicon.ico, even for "compatibility". Removing the favicon.ico will also remove the entries needed in angular.json and remove the only asset stored outside of src/assets.

It should be replaced in favor of modern favicon methods. PWAs should use manifest.json

  <link rel=icon href="assets/favicon-16x16.png" sizes="16x16" type="image/png">
  <link rel=icon href="assets/favicon-32x32.png" sizes="32x32" type="image/png">
  <link rel=icon href="assets/favicon.svg" sizes="any" type="image/svg+xml"> 

Note: svg doesn't have full browser support.

We haven't needed favicon.ico in years, but it's still widely used and implemented, even though all browsers support modern methods.

Contributor guide