The resource at “http://some-urls/some-files.js” was blocked because tracking protection is enabled

坚强是说给别人听的谎言 提交于 2019-11-26 17:13:46

问题


I got this error in javascript console while using the Facebook Login Api.

The resource at "http://connect.facebook.net/en_US/sdk.js" was blocked because tracking protection is enabled.


 // 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/en_US/sdk.js";
                fjs.parentNode.insertBefore(js, fjs);
            }(document, 'script', 'facebook-jssdk'));

Google + plugin also blocked,Now my Facebook like and other social network plugins not work on Firefox 42.0

I used Firefox 42.0


回答1:


This feature call Firefox Tracking Protection.

Tracking Protection allows Firefox users to avoid many forms of online tracking. Originally based on the blocklist from antitracking startup Disconnect, the feature offers better privacy while also speeding up page loads by blocking requests to tracking domains.

How to turn Off Tracking Protection

  • In the Firefox Location bar, type about:config and press Enter.

The about:config "This might void your warranty!" warning page may appear. Click I'll be careful, I promise! to continue to the about:config page.

  • Search for privacy.trackingprotection.enabled.

  • Double-click privacy.trackingprotection.enabled to set its value to false.

This will turn off Tracking Protection. If you later want to turn it back on, repeat the above steps to toggle the preference back to false.



来源:https://stackoverflow.com/questions/33668378/the-resource-at-http-some-urls-some-files-js-was-blocked-because-tracking-pr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!