gpt4 book ai didi

javascript - Chrome - "Trying to load script from unauthenticated sources"

转载 作者:行者123 更新时间:2023-11-28 03:46:55 30 4
gpt4 key购买 nike

我的网站出现了一些问题。它运行并呈现得很好,但我在地址栏的右上角看到了被阻止的脚本图标。我不希望用户在访问网站时看到这个弹出窗口。我可以按“加载不安全的脚本”,这将使它消失,但我的网站不再是 https。我已经尝试重新排列这些行并尝试在我的 html 中进行其他操作,但我似乎找不到解决方案。该站点使用 Bootstrap 以及我自己的 2 个 CSS 文件和 1 个 JavaScript 文件。下面是 HTML head 标签。下面是 Chrome 显示的错误。有谁知道为什么会这样?

<head>
<meta charset="utf-8">
<meta name="keywords" content="NASA,JPL,near,earth,objects,asteroid,meteor,neo,neowise,api,opendata">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Nearing Earth</title>

<!-- Lines necessary for Bootstrap-->
<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

<!--My files-->
<link rel="stylesheet" href="neoRules.css">
<link rel="stylesheet" src="neoStyles.css">
<link rel="icon" type="image/ico" href="favicon.ico"/>
<script src="https://nearingearth.com/neoFunctions.js" type="text/JavaScript"></script>

<!--[if lt IE 9]>
<script src="/js/html5shiv.js" type="text/javascript"></script>
<script src="/js/respond.min.js" type="text/javascript"></script>
<![endif]-->
</head>

错误一:

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

错误 2:

Uncaught Error: Bootstrap's JavaScript requires jQuery at bootstrap.min.js:6

最佳答案

neoFunctions.js 在没有 SSL 的情况下加载 jquery。这与您的 HTML 无关。我可能会建议下载 neoFunctions.js 并修改脚本以将 http://的实例替换为 https://并将其托管在您自己的服务器上。

关于javascript - Chrome - "Trying to load script from unauthenticated sources",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43922755/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com