favicon for my app

7 views
Skip to first unread message

JanP

unread,
Sep 12, 2010, 4:12:21 PM9/12/10
to Chromium Apps
I want to change the icon of my app tab dynamically. I do this in a
script by adding a
<link rel="shortcut icon" href="/images/favicon.ico" />
in the head of my page but nothing happens. So logical next step is to
test if it works by putting it in the static html. Same thing nothing
happens.
So I tested something else:
<link rel="shortcut icon" href="http://groups.google.com/groups/img/3/
favicon.ico" />
this works, I see the google groups icon on my app tab.
I have a folder called 'images' in my app folder and I have a file
called favicon.ico in there and I can open it in the browser with the
url 'chrome-extension://<app id>/images/favicon.ico'
I have no idea what is going wrong here, is this a bug or am I doing
something wrong?

PhistucK

unread,
Sep 12, 2010, 4:19:09 PM9/12/10
to JanP, Chromium Apps
Yes, there is a bug for letting extensions (apps count as extensions for that matter) have (local) favicons. Search crbug.com for it.

PhistucK

JanP

unread,
Sep 12, 2010, 4:32:30 PM9/12/10
to Chromium Apps
thanks, I starred these two bug reports (in case someone else is
looking for it).

http://code.google.com/p/chromium/issues/detail?id=11854&q=local%20favicon&colspec=ID%20Stars%20Pri%20Area%20Feature%20Type%20Status%20Summary%20Modified%20Owner%20Mstone%20OS
http://code.google.com/p/chromium/issues/detail?id=51270&q=local%20favicon&colspec=ID%20Stars%20Pri%20Area%20Feature%20Type%20Status%20Summary%20Modified%20Owner%20Mstone%20OS

I think both apply because I am also unable to see the favicon when I
open the main html page for my app in a tab.
I am making a packaged app so it is ridiculous that I only have to
host 2 16x16 icons just because the API doesn't support loading
locally stored assets. This is definitely a shortcoming.

I am going to try using data URI's. I hope that will work for me

On 12 sep, 22:19, PhistucK <phist...@gmail.com> wrote:
> Yes, there is a bug for letting extensions (apps count as extensions for
> that matter) have (local) favicons. Search crbug.com for it.
>
> ☆*PhistucK*

PhistucK

unread,
Sep 12, 2010, 5:03:45 PM9/12/10
to JanP, Chromium Apps
For not being able to load "chrome://favicon/", you have to add this host to the permissions key in your manifest, I think.
PhistucK

JanP

unread,
Sep 13, 2010, 6:06:11 AM9/13/10
to Chromium Apps
I just don't understand why inserting the picture in the page works:
<img src="/images/favicon.ico" width:"16px" height"16px" />
but adding it as a reference in the head doesn't work. What is the
difference? Why do have the permission in one case but not in the
other?


On Sep 12, 11:03 pm, PhistucK <phist...@gmail.com> wrote:
> For not being able to load "chrome://favicon/", you have to add this host to
> the permissions key in your manifest, I think.
> ☆*PhistucK*
>
>
>
> On Sun, Sep 12, 2010 at 22:32, JanP <potoms....@gmail.com> wrote:
> > thanks, I starred these two bug reports (in case someone else is
> > looking for it).
>
> >http://code.google.com/p/chromium/issues/detail?id=11854&q=local%20fa...
>
> >http://code.google.com/p/chromium/issues/detail?id=51270&q=local%20fa...

PhistucK

unread,
Sep 13, 2010, 6:08:37 AM9/13/10
to JanP, Chromium Apps
You are referring to something else. I am talking about stuff from chrome://favicon, you are talking about stuff from your extension.

PhistucK

JanP

unread,
Sep 13, 2010, 1:44:13 PM9/13/10
to Chromium Apps
it worked by encoding the icon to a base64 data URI

just telling in case someone encounters the same problem.

On 13 sep, 12:08, PhistucK <phist...@gmail.com> wrote:
> You are referring to something else. I am talking about stuff from
> chrome://favicon, you are talking about stuff from your extension.
>
> ☆*PhistucK*

runrunforest

unread,
Sep 14, 2010, 12:43:43 PM9/14/10
to Chromium Apps
How do you encode icon to base64?

PhistucK

unread,
Sep 14, 2010, 3:16:23 PM9/14/10
to runrunforest, Chromium Apps
Reply all
Reply to author
Forward
0 new messages