Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/478.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Facebook Web应用程序开发错误_Javascript_Jquery_Facebook_Google Chrome - Fatal编程技术网

Javascript Facebook Web应用程序开发错误

Javascript Facebook Web应用程序开发错误,javascript,jquery,facebook,google-chrome,Javascript,Jquery,Facebook,Google Chrome,我在chrome上的调试控制台上不断遇到以下错误 [blocked] The page at https://myURL/canvas ran insecure content from http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/base/jquery-ui.css. [blocked] The page at https://URL/canvas ran insecure content from http://con

我在chrome上的调试控制台上不断遇到以下错误

[blocked] The page at https://myURL/canvas ran insecure content from http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/base/jquery-ui.css.
[blocked] The page at https://URL/canvas ran insecure content from http://connect.facebook.net/en_US/all.js.
[blocked] The page at https://URL/canvas ran insecure content from http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js.
这些是附加到头部的js脚本


这是一个facebook应用程序,它可以向我自己的服务器发出GET请求,这个应用程序可以正常工作,并且刚刚停止工作,我的代码没有任何更改!我不确定Facebook是否阻止了我的请求。

当通过HTTPS加载主页(在您的情况下是您的Facebook应用)时,通过HTTP在其他域上加载脚本和其他外部资源(如图像)时会发生这些错误

查看应用程序的代码,调用外部脚本时使用协议相关URL。例如,与此相反:

<script src="http://connect.facebook.net/en_US/all.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/base/jquery-ui.css">

这样做:

<script src="//connect.facebook.net/en_US/all.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<link rel="stylesheet" type="text/css" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/base/jquery-ui.css">

编辑:注意,如果在样式表上使用协议相关URL,IE7和IE8将下载两次:

谢谢,这就是问题所在!