Display icon for submitting Atom to Google Reader

Google Reader does not display an icon for my Atom feed http://feeds.feedburner.com/CartesianClosedComic .

Here I tried, based on various offers found on the Internet:

  • An <icon> element has been added that points to the png icon. (I also tried the .ico icon.) IMO, that alone should be enough, but for some reason this is not the case.
  • Added element <link rel="shortcut icon" type="image/x-icon" /> , pointing to the .ico icon, similar to regular pages.
  • Added <link rel="alternate" type="text/html" /> element pointing to a web page with a symbol.

None of the above helped.

I also found the hypothesis that you should have an icon in the root path of the domain (something like http://mydomain.com/favicon.ico ), but this is not an option for me.

+4
source share
1 answer

Google Reader uses the URLs of the form http://s2.googleusercontent.com/s2/favicon?domain_url=http://domainname/foo/bar/baz.html to cache websites. I confirmed that their cache service makes one request to get http://domainname/favicon.ico and nothing more; it doesn’t matter if you specify the URL for a specific page - this page is never requested, so any icon specified in it will not be taken into account.

The bad news is that the only way to influence this favicon cache service is to actually serve as an icon for the URL /favicon.ico . The good news is that you don’t need to serve the actual Windows icon file at this URL; The PNG image located at this URL works great.

If you are unable to host the actual /favicon.ico file on your server, you can configure some kind of redirection or URL rewriting to ensure that favicon is placed elsewhere. I tested it and I can confirm that Google will follow redirects, even for URLs outside the site, so you don’t even need to place icons in the same domain. However, the worse news is: Google has not bothered to send the User-Agent header with this request, so you cannot configure conditional forwarding only for your favicon cache. All requests in my tests came from the 74.125.18.0/24 network, so you could implement conditional redirection based on this.

I see that you are posting the content of your feed in the /ccc subdirectory of your site, and you probably do not want to post your comic book as an icon for your site. I also see that your hosting provider offers at least 10 subdomains (I have no idea which package you are using, but for the lowest offer), so you can create a subdomain on your website (say ccc.ro-che.info ) and use this as the URL of your feed. Google will try to extract http://ccc.ro-che.info/favicon.ico for the feed, and you can configure a specific favicon resource only on this subdomain. You can also set up redirects from http://ccc.ro-che.info/* to http://ro-che.info/ccc/* so that your comic book remains in its current position, and everything coming from the channel link will also be redirected to the current location of the resource.

+5
source

Source: https://habr.com/ru/post/1441097/


All Articles