Finding favicons for bookmarks

1,144 views
Skip to first unread message

IlkkaH

unread,
May 29, 2010, 12:53:10 PM5/29/10
to Chromium-extensions
Hi,

I'm creating an extension to handle bookmarks. Is there a way to get
the favicons for each bookmark? Didn't find anything in the docs.

Thanks.

Mohamed Mansour

unread,
Jun 2, 2010, 11:41:19 PM6/2/10
to IlkkaH, Chromium-extensions
Currently there is no API to get favicons, but in the issue tracker there are some requests:
There is a workaround though, if you have the URL (which you do), you can request the "[URL]/favicon.ico" for each link. For example, "http://google.com" favicon is located in "http://www.google.com/favicon.ico" similar to other websites.

-
Mohamed Mansour
m...@chromium.org



--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.


richard92m

unread,
Jun 3, 2010, 12:34:03 AM6/3/10
to Chromium-extensions
One way of retrieving favicons (not specific to chromium extensions)
is to go to: http://www.google.com/profiles/c/favicons?domain=targetsite.com

It is pretty convenient; however, this might be breaching some Google
term of service so use it at your own risk.

P.S. This is how the favicons for google profiles' linked sites work.

IlkkaH

unread,
Jun 5, 2010, 12:24:52 AM6/5/10
to Chromium-extensions
Thank you so much, especially richard92m, that work around seems to
work quite well.

I'm really a big fan of the other work around (site/favicon.ico) since
sites can name their favicons as they want (and define it in html),
although maybe they use the favicon.ico name mostly. But still.. I've
personally named my favicons to something else and there was a good
reason to do so (although it escapes me right now :-).

I created a feature request in crbug.com also specifically for this:
http://code.google.com/p/chromium/issues/detail?id=45474

I wasn't really sure if this feature had been requested, so I decided
to make it really clear in the issue.

Thanks,
Ilkka

IlkkaH

unread,
Jun 5, 2010, 12:26:39 AM6/5/10
to Chromium-extensions
> I'm really a big fan of the other work around (site/favicon.ico) since

Meant to say "not a big fan" although it probably came through.

Ilkka

PAEz

unread,
Jun 5, 2010, 8:37:26 AM6/5/10
to Chromium-extensions
Maybe this site is of use to you.....
http://getfavicon.appspot.com/

IlkkaH

unread,
Jun 5, 2010, 3:22:41 PM6/5/10
to Chromium-extensions
> Maybe this site is of use to you.....http://getfavicon.appspot.com/

That could work too, thanks. Bookmarked.

Ilkka

PAEz

unread,
Jun 6, 2010, 8:09:50 AM6/6/10
to Chromium-extensions
I just noticed this extension......
https://chrome.google.com/extensions/detail/ebalpcfngdhkpndfognjoffolfpiilnm
....using...
"permissions": [ "chrome://favicon/" ],
...maybe you want to look at that, I dont know the details

Mohamed Mansour

unread,
Jun 6, 2010, 9:41:44 AM6/6/10
to PAEz, Chromium-extensions
Sorry, everyone, I totally forgot that the favicon uri scheme has been exposed (if you read the bug I stated before), they are still working on exposing other areas such as theme, etc. To use favicon uri in your extensions, just add "chrome://favicon/" to your permissions and just use it by doing this:

chrome://favicon/http://google.com

A cheaper request to get favicon instead of doing an external request which might take time and resources.

-
Mohamed Mansour
m...@chromium.org


IlkkaH

unread,
Jun 8, 2010, 7:12:46 AM6/8/10
to Chromium-extensions
I tried that chrome://favicon/ quite in the beginning but I didn't
seem to have the permission to get those favicons that way. I'm not
sure what it's currently at but then I didn't get it to work...

Ilkka

On Jun 6, 4:41 pm, Mohamed Mansour <m0.interact...@gmail.com> wrote:
> Sorry, everyone, I totally forgot that the favicon uri scheme has been
> exposed (if you read the bug I stated before), they are still working on
> exposing other areas such as theme, etc. To use favicon uri in your
> extensions, just add "chrome://favicon/" to your permissions and just use it
> by doing this:
>
> chrome://favicon/http://google.com
>
> A cheaper request to get favicon instead of doing an external request which
> might take time and resources.
>
> -
> Mohamed Mansour
> m...@chromium.org
>
>
>
> On Sun, Jun 6, 2010 at 8:09 AM, PAEz <cdkp...@gmail.com> wrote:
> > I just noticed this extension......
>
> >https://chrome.google.com/extensions/detail/ebalpcfngdhkpndfognjoffol...
> > ....using...
> > "permissions": [ "chrome://favicon/" ],
> > ...maybe you want to look at that, I dont know the details
>
> > On Jun 5, 12:22 pm, IlkkaH <ilk...@gmail.com> wrote:
> > > > Maybe this site is of use to you.....http://getfavicon.appspot.com/
>
> > > That could work too, thanks. Bookmarked.
>
> > > Ilkka
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Chromium-extensions" group.
> > To post to this group, send email to chromium-extensi...@chromium.org.
> > To unsubscribe from this group, send email to
> > chromium-extensions+unsubscr...@chromium.org<chromium-extensions%2Bunsubscr...@chromium.org>
> > .

Paul Kinlan

unread,
Jun 8, 2010, 9:45:13 AM6/8/10
to Mohamed Mansour, PAEz, Chromium-extensions
Just to add, this only works properly if Chrome already has a copy of the favicon.  If it doesn't then it will display a "new page" icon.

Mohamed Mansour

unread,
Jun 8, 2010, 10:04:11 AM6/8/10
to Paul Kinlan, PAEz, Chromium-extensions
On Tue, Jun 8, 2010 at 9:45 AM, Paul Kinlan <paulk...@chromium.org> wrote:
Just to add, this only works properly if Chrome already has a copy of the favicon.  If it doesn't then it will display a "new page" icon.

Yes that is correct, but if you have it bookmarked (or visited), you will have that favicon. This is what the bookmark manager uses. 

Ken Liu

unread,
Jun 8, 2010, 11:15:56 AM6/8/10
to Paul Kinlan, Mohamed Mansour, PAEz, Chromium-extensions
Can anyone think of a way to nudge Chrome so that it will grab the
favicon if it is not already cached?

My extension is a bookmark manager of sorts, but doesn't use local
bookmarks storage, so I can't count on the favicon to be cached.

Ken

On Tue, Jun 8, 2010 at 9:45 AM, Paul Kinlan <paulk...@chromium.org> wrote:

Mohamed Mansour

unread,
Jun 8, 2010, 11:22:04 AM6/8/10
to Ken Liu, Paul Kinlan, PAEz, Chromium-extensions
The only way to "nudge" it, is to request it. But you don't want to do that. Even in Chrome, when we do a bookmark sync on a fresh Chrome installation, the bookmark favicon will be empty until you visit them. I don't believe you should hurt performance for your extension for something small like this. Sure it will be nice, but there is a trade off.


-
Mohamed Mansour
m...@chromium.org
Reply all
Reply to author
Forward
0 new messages