ejci / favico.js

Make use of your favicon with badges, images or videos
http://lab.ejci.net/favico.js/
GNU General Public License v2.0
8.71k stars 585 forks source link

Error setting favicon. Favicon image is on different domain (Icon: , Domain: mmaprophet.com) #43

Open ymorin007 opened 10 years ago

ymorin007 commented 10 years ago

Hi,

My favicon is located at http://mmaprophet.com/images/favicon.png but when I access
http://mmaprophet.com/event/UFC170 I will get the error message.

"Error setting favicon. Favicon image is on different domain (Icon: , Domain: mmaprophet.com)"

My code:

link rel="shortcut icon" href="http://mmaprophet.com/images/favicon.png" type="image/png"

script:

$(function() { var favicon=new Favico({ animation:'slide' }); favicon.badge(1);
});

branneman commented 10 years ago

I have the same problem with v0.3.4

branneman commented 10 years ago

The problem seems to have been introduced with v0.3.3, since it does not work in v0.3.3, but it does work in v0.3.2.

ejci commented 10 years ago

I will release bugfix ASAP

moacode commented 10 years ago

Do you know when a bugfix might be released for this? We're having the same issue.

ejci commented 10 years ago

Bugfix will be released this week.

ejci commented 10 years ago

Fix will be released with version 0.4.0 on 13.04.2014

wtsui commented 10 years ago

Having the same issue. Any update?

ejci commented 10 years ago

Hi. Im working on new version that will support FontAwesome icons and also server side generated icon for IE11+. Its lot of work and I recently moved to different country and started new job so I don't have as much time as I would like to have... Sorry for delay :(

sgrigson commented 10 years ago

Version 4.0 seems to have not been released still?

Even a bugfix to the current version would be nice. I was going to use this, but as it turns out it's telling me my favicon.ico is on a different domain (it isn't).

ejci commented 10 years ago

0.3.5 with bugfixes is out. 0.4.0 is still in progress :(

xob commented 10 years ago

This might be slightly unrelated, but I tried using this on bitbucket to add a badge to their icon (using a TamperMonkey script), but I get the same error message. This is the error I get: Error initializing favico. Message: Error setting favicon. Favicon image is on different domain (Icon: https://d3oaxc4q5k2d6q.cloudfront.net/m/6a5c573024ea/img/favicon.png, Domain: bitbucket.org)

Is there any plan on adding the different domain feature, or is it simply impossible to do?

ejci commented 10 years ago

The browser will not allow javascript to "manipulate" images that are on different domain. Its for various security reasons. So unfortunately its impossible to do it directly on the client.

It will be possible with v0.4.0 where Im planning to also introduce server manipulation as a fallback method. It will add badges but without animations (its still work in progress)

gugiserman commented 9 years ago

@ejci I'm getting this error right now when running our app over https :(

ejci commented 9 years ago

I removed the check for domain. If the image will have right header it should work from all domains. https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS

hworld commented 9 years ago

It appears that more is needed, even if the server returns correct headers. I sent in a PR at #72. Would be great to see if it works for others. It's working for me now.

ejci commented 9 years ago

@hworld good catch! I will merge the change.

dtheodor commented 8 years ago

What about when there is no server support for CORS, which does not allow canvas to be used at all. Can you bypass the canvas?