I am loading the facebook js sdk asynchronous in my project with the following code:
window.fbAsyncInit = function () {
FB.init({
appId: settings.facebookAppId,
cookie: true, // enable cookies to allow the server to access the session
xfbml: true, // parse social plugins on this page
version: 'v2.0' // use version 2.0
});
FB.Canvas.setAutoGrow();
};
// Load the SDK asynchronously
(function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s);
js.id = id;
js.src = "//connect.facebook.net/de_DE/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
this worked fine for me since firefox tracking protection. i noticed that in firefox 42.0 the tracking protection blocks the asynchronous load of the facebook js sdk.
but it seems to be only blocked, when i am not logged in on facebook.
does anyone has an idea how to solve this problem?
many thanks!
Firefox Desktop and Firefox for Android include built-in tracking protection. In Private Browsing windows (tabs, in Firefox for Android), Firefox will block content loaded from domains that track users across sites.
Tracking Protection is a new platform-level technology that blocks HTTP loads at the network level. It is based on the Safe Browsing technology that powers our phishing and malware protection. This feature was part of the Polaris initiative.
Select the Privacy & Security panel. Under Enhanced Tracking Protection, select the Custom radio button. Check Cookies and use the drop-down menu to select the types of cookies you wish to block. The default setting is Cross-site tracking cookies — includes social media cookies.
Tracking Protection (enabled by default in Firefox 42+) blocks any resources from a pre-defined set of domains while in private browsing mode.
Starting in version 42, Firefox Desktop and Firefox for Android include built-in tracking protection. In Private Browsing windows (tabs, in Firefox for Android), Firefox will block content loaded from domains that track users across sites.
https://developer.mozilla.org/en-US/Firefox/Privacy/Tracking_Protection
Tracking protection currently uses disconnect.me's basic list by default.
The fact that the script is loaded asynchronously is irrelevant as its the domain that is blacklisted.
Even if you host the JavaScript file yourself, any requests to Facebook domains are also blocked.
So, the only way to allow these requests is to disable tracking protection in the browser.
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