You could allow cross-domain requests during testing by running chrome with the --disable-web-security
command line option. This should probably get rid of the error (and allow FB to spy on your testing ;)
This happens when a source from an different domain is loaded and tries to access the document.cookie. It happens with head sources (script tags) as well with iframe documents which try to access the document.cookie for some reason.
Whats the problem?
Tons of Unsafe JavaScript attempt to access frame with URL...
error messages in the Chrome JS console.
As @thechrisproject points out, these errors are caused by many reputable 3rd party api's and widgets, including but not limited to:
My understanding on the why: (please correct me if I'm wrong)
Chrome has stricter security settings and/or shows more such errors than competing browsers. API/widget/embed authors attempt to do things (cross-domain/frame) that will not work in all browsers (probably for their own reporting/analytics) but that don't actually effect the usuabilty of their widget if it doesn't work (just causes a lot of annoying errors)
Quick Answer
NO, you cannot (just) suppress these errors in the chrome console.
Solutions?
--disable-web-security
command line option. More information here: Disable same origin policy in Chrome. Note that this setting will negatively effect the security of your browser. I have 2 chrome shortcuts so I can open it with or without this flag.Since we can't blame the people from Google for constructing such a safe browser, I think the best solution is to use Facebook's server-side solutions (e.g. PHP SDK), it'll save you a lot, lot, lot, lot, lot of headache. The only advantage I see in using the FB javascript SDK is the popup login which you can do yourself using javascript/jQuery.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With