Last night I implemented favicon icons in Feed Vortex. I’d seen this in FeedDemon and I really liked it. Instead of the icons I designed for Feed Vortex (which are pretty ugly), you can see the icons the site a feed belongs to uses. This adds some color and some familiarity to the feed list in Feed Vortex.
But downloading the icons is harder then you might expect. I expected to just get the favicon.ico at the root of the site and be done with it. Boy was I wrong.
One thing that I ran into was that some sites didn’t have a favicon.ico at their root, but at some other location. They tell the browser this by adding a
tag to the page. Fair enough. Maybe I’ll figure out a way around this, but this seems like a correct way to have the favicon at another position.But then there are sites like www.apple.com that are simply misconfigured. Sure, apple.com has a favicon.ico at the right place. But they serve it as “text/plain”. In other words, I ask for the icon file and apple.com says: “Sure, here is the file. By the way, it’s just a text file.” But it isn’t. It’s a valid icon file…..well, semi-valid, but I’ll get to that later.
There are also sites like the mono-project.com website. They don’t have a favicon.ico, but instead of returning a “404 -page not found” error. They send a “304 page moved” HTTP code and then serve a normal webpage with the “200 Everything is A-okay” HTTP code. So Feed Vortex never knows there is no icon, it just doesn’t understand the data. It expects an image file, but gets an HTML file. I must admit that my website is also guilty of this and I need to fix this ASAP. But this is apparently the default configuration my webhost uses.
And then there are the semi-valid icon files. Sometimes a website serves an icon file and Firefox sees and understands it. Internet Explorer sees and understands it. Hell, even Windows explorer can read it, but the .NET Bitmap class can’t and tells me it’s invalid data. Livejournal.com has such an icon.
All in all this wasn’t the simple ordeal I thought it would be, but most of my feeds now have nice icons and I’ll figure out a way to deal with the others in time.
[Now playing: Shakira - Suerte]