flatpressblog / flatpress

FlatPress is a lightweight, easy-to-set-up flat-file blogging engine.
https://flatpress.org
GNU General Public License v2.0
181 stars 58 forks source link

FavIcon plugin fine-tuning #428

Closed Fraenkiman closed 2 months ago

Fraenkiman commented 2 months ago

In some cases, especially with shared hosts, there is already a favicon.ico file in the HTTP root directory. However, a development document at Googledocs describes that there should only be one icon per HTTP host/website.

My observation over several weeks in the Google Searchconsole is that the crawler is irritated if either several favicon.ico files are present in the website (http host) or the crawler is fobbed off with 404.

The effect is that no favicon file is displayed in the search results during indexing.

A temporary redirection http_response_code(307) when the plugin is active seems more elegant -> implemented here. When the plugin is active, the user agent and the crawler also receive a message (?v=2) that the HTTP host is equipped with new favicons.

In addition, some FlatPress icons have been given a final polish. This is particularly noticeable on mobile devices and search engines, but also when creating a FlatPress link in social media.

You can use https://realfavicongenerator.net/favicon_checker for testing.