[wp-trac] [WordPress Trac] #47398: Remove wp_favicon_request
WordPress Trac
noreply at wordpress.org
Tue May 28 06:34:54 UTC 2019
#47398: Remove wp_favicon_request
---------------------------------+------------------------------
Reporter: jonoaldersonwp | Owner: SergeyBiryukov
Type: enhancement | Status: reviewing
Priority: normal | Milestone: Awaiting Review
Component: Bootstrap/Load | Version:
Severity: normal | Resolution:
Keywords: has-patch close seo | Focuses:
---------------------------------+------------------------------
Changes (by ocean90):
* keywords: seo has-patch => has-patch close seo
* milestone: 5.3 => Awaiting Review
Comment:
Can you please point me to a document where Google explicitly says that
it's only indexing a (legacy) favicon.ico in the root directory of a site?
* `wp_favicon_request()` handles only requests to `/favicon.ico` and only,
if a real file doesn't exist at the same place.
* "many themes don't have / properly support favicons." – Thankfully! Just
like logos, favicons shouldn't be handled by the theme, otherwise every
site would have the same icon. That's why we have the site icon since
WordPress 4.3.
* "I'm sorry but the performance argument is moot" – I'm sorry, it's not.
As mentioned in the commit, we'd load WordPress twice for a single
request, one for the regular page and one for the (missing) icon. The
existence of a favicon.ico is not given because it usually requires access
to the file system to place it right in the root of the directory. And
that's not even possible for sites which have installed their WordPress in
a sub directory.
* In the [https://support.google.com/webmasters/answer/9290858 Help Center
Google explains] how a favicon should be implemented. And it's not saying
by placing a favicon.ico in the root directory, but rather by adding the
`<link>` tag to the header, pointing the a favicon at any place on the
same domain. For the `rel` attribute Google supports `shortcut icon`,`icon
`,`apple-touch-icon`, and `apple-touch-icon-precomposed`.
* Additionally, the [https://support.google.com/webmasters/answer/9290858
guidelines] include what formats are supported. And it's basically "Any
[https://en.wikipedia.org/wiki/Favicon#File_format_support valid favicon
format] is supported." (ico, png, jpg, svg, and others).
> The Customizer offer support for defining a 'Site Icon', but there's
currently no mechanism to expose this at /favicon.ico.
Based on my comments above, it doesn't have to:
* The site icon allows the user to define "a visual representation of your
website's brand" ✅
* The site icon is crawlable by Google ✅
* The site icon is a multiple of 48px square ✅
* The site icon is a supported file format (png, jpeg, gif) ✅
* The site icon is exposed in the header with the relevant `<link>` tag,
using the `icon` and `apple-touch-icon-precomposed` relationship. ✅
So, I'm tending to close this as wontfix since it doesn't seem to be
necessary.
PS: Adding a filter isn't possible since the plugin API isn't loaded at
this point, neither are plugins.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47398#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list