Bug 111507

Summary: Custom Feed Icon & Site's Favicon
Product: [Applications] akregator Reporter: Sebastien <slaout>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: karaluh, reitzmichnicht
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Sebastien 2005-08-25 19:52:27 UTC
Version:            (using KDE KDE 3.4.0)
Installed from:    Compiled From Sources

Some feeds don't have any favicon in Akregator whereas they HAVE one when browsed in Konqueror.

I suspect RSS should have a tag saying the URL of the favicon.
If a RSS don't have this tag, the favicon of the SITE should be used.

Or perhapse this is already the case?
If yes, it doesn't work with http://linuxfr.org/backend/news/rss20.rss : http://linuxfr.org/ have a favicon but Akregator doesn't show it.

If Akregator only search a favicon.ico in the root of the server, I propose to also search in the index HTML pagefor such tag: <link rel="shortcut icon" type="image/x-icon" href="../images/favicon.ico" />
Here we see that the icon is in a subdirectory.

In the very last case, if the website doesn't have any favicon, the Feed Properties dialog should offer to set a custom icon.
Comment 1 Eckhart Wörner 2005-08-29 16:05:05 UTC
For normal HTML pages, there are two methods of retrieving favicons:
- A linked favicon via <link /> tag
- A favicon in a specified place (e.g. http://linuxfr.org/favicon.ico)

The first method is useful only for HTML pages, as there is no equivalent in RSS to specify favicons.
The second method is also useful for RSS files. However, there is no such file as http://linuxfr.org/favicon.ico which could be used for favicon display.
IMHO it's a bad idea to search for a favicon in the index file because
- there is no rule that an index file even has to exist, and the method is absolutely uncommon (in contrast to e.g. favicon.ico or robots.txt)
- if an index file exists, it may be probably very large, which can have negative effects on the traffic for user and/or website provider.

The only useful thing IMHO would therefore be a custom icon.
Comment 2 Sebastien 2005-09-03 17:21:28 UTC
I proposed to look at the index page as a fallback mechanisme.

Yes, it can to not exists, but in the majority of the cases, it will.
Akregator just have to ask the root URL: http://linuxfr.org/
It will be automatically redirected by the webserver to the right index page:
- index.php
- index.html
- index.xthml
- pub/index.html in the case of LinuxFr
- Whatever crazy other URL...
like any Web Browser is redirected.

Of course this should be the last method to get a favicon.

But I disagree: Akregator should at last TRY.

Some webdevelopers could not know how to make .ico files, he/she could name it 
favicon.png (like I've done for years before knowing the comandline to do 
the .ico file)... That works in any browser, so...

This is better than proposing no icon at all.

And if you care about traffic, fetch it only ONCE!
At feed creation or every month/year if no icon has been found.
Also fetch only the first ~500 bytes and abord if nothing has been found...
Some forums on the Web allow to use the favicon of the author's webpage as a n 
avatar: they only fetch the first bytes and it works.

Akregator custom icons are good of course for sites with NO icon, but if it 
can be done automatically for some sites, why complicate the life of users:
The user should save the icon to a place: not obvious (should look and 
UNDERSTAND the HTML source and retreive it), and then load it, or look at the 
KDE favicons cache.

Oh yes: Konqueror can see the favicons and SAVE IT under:
/var/tmp/kdecache-$USER/favicons
For LinuxFr on my system:
/var/tmp/kdecache-seb/favicons/linuxfr.org_images_favicon.png

You can retreive it in the code with the following method:
QString icon = KMimeType::iconForURL(url.url());
And that's all. Not time consuming, not difficult to implement...
At least, before to retreive the icon by itself, Akregator should call that 
method to know if KDE have the favicon in its cache (I don't know if it ALSO 
try to fetch the icon of the URL if it is not in cache yet: I don't think 
so).
See also KMimeType::favIconForURL() : perhapse Akregator already use it...

I hope to have been useful for the solving of this bug.
Comment 3 Tobias Leupold 2007-03-22 00:18:34 UTC
I also noticed akregator not displaying the icon of my weblog's Atom feed, although an Icon is set in the feed. After playing around a while I think I know why:

Adding http://nasauber.de/blog/weblog.xml does NOT show the icon.
Adding http://www.nasauber.de/blog/weblog.xml -- which points to exact the same file -- DOES show the icon.

So could it be that this is a bug in akregator?
Comment 4 Denis Kurz 2016-09-24 19:38:30 UTC
This bug has only been reported for versions before 4.14, which have been unsupported for at least two years now. Can anyone tell if this bug still present?

If noone confirms this bug for a Framework-based version of akregator (version 5.0 or later, as part of KDE Applications 15.08 or later), it gets closed in about three months.
Comment 5 Denis Kurz 2017-01-07 22:39:14 UTC
Just as announced in my last comment, I close this bug. If you encounter it again in a recent version (at least 5.0 aka 15.08), please open a new one unless it already exists. Thank you for all your input.