angular/angular-cli

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

开放

#11,275 创建于 2018年6月17日

 (9 条评论) (8 个反应) (0 位负责人)TypeScript (11,999 个派生)batch import
area: @schematics/angularfeaturefeature: insufficient voteshelp wanted

仓库指标

星标
 (26,585 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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.

贡献者指南