[PATCH] favicons with rel="icon"

Alexander Kellett kelletta at eidetica.com
Sun Jun 23 22:22:52 BST 2002


yoyo malte,

On Sun, Jun 23, 2002 at 09:06:28PM +0200, Malte Starostik wrote:
> Am Sunday 23 June 2002 18:15 schrieb Alexander Kellett:
> > Hiya all,
> >
> > I just noticed that khtml doesn't support the <link> favicon on
> > mozilla.org (among other sites) and checking out the source found
> > that it uses (rel="icon"), as compared to khtml which looks for
> > the IE extension (rel="shortcut icon").
> >
> > Here's a patch to fix it.
> Looks good to me.

But alas not good enough, it does improve the situation but there are actually
still quite a few cases where the faviconmgr still isn't working :(

Example:
   www.mozilla.org has an icon after my fix
   but www.mozilla.org/feedback.html doesn't

AFAICS, the problem is as follows, seticonforurl is called correctly, but as 
its not a host icon, but is rather a "link" icon, the icon and its related 
iconurl are not "related" correctly (i.e the config file doesn't ever get a 
writeEntry for this url).

If all such relations are called for a large host then the faviconrc would get
quite enormous. Therefore another less persistant but "good enough" way to do fix
this might be to add a cache of page urls and related iconurls to the kded
module itself. I'll try writing a patch now.

> > Though i'm not sure if rather than contains("icon"), it should use
> > rel.stripWhitespace (== "icon" || == "shortcut icon").
> I'd suspect that would "break" on some other sites with creative webmasters. 
> Who knows what else people write inside the quotes ;-)

;-))

thanks for the quick reply,
Alex

--
kelletta at eidetica.com           (lypanov)           http://lypanov.shacknet.nu




More information about the kfm-devel mailing list