【发布时间】:2017-07-01 23:17:07
【问题描述】:
我将以下 HTML 添加到我的 blogger.com 主题的 head 部分。
<link href='https://alexgorbatchev.com/pub/sh/current/styles/shCore.css' rel='stylesheet' type='text/css'>
<link href='https://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css' rel='stylesheet' type='text/css'>
<script src='https://alexgorbatchev.com/pub/sh/current/scripts/shCore.js' type='text/javascript'></script>
<script src='https://alexgorbatchev.com/pub/sh/current/scripts/shBrushCpp.js' type='text/javascript'></script>
<script src='https://alexgorbatchev.com/pub/sh/current/scripts/shBrushCSharp.js' type='text/javascript'></script>
<script src='https://alexgorbatchev.com/pub/sh/current/scripts/shBrushCss.js' type='text/javascript'></script>
<script src='https://alexgorbatchev.com/pub/sh/current/scripts/shBrushJava.js' type='text/javascript'></script>
<script src='https://alexgorbatchev.com/pub/sh/current/scripts/shBrushJScript.js' type='text/javascript'></script>
<script src='https://alexgorbatchev.com/pub/sh/current/scripts/shBrushPhp.js' type='text/javascript'></script>
<script src='https://alexgorbatchev.com/pub/sh/current/scripts/shBrushPython.js' type='text/javascript'></script>
<script src='https://alexgorbatchev.com/pub/sh/current/scripts/shBrushRuby.js' type='text/javascript'></script>
<script src='https://alexgorbatchev.com/pub/sh/current/scripts/shBrushSql.js' type='text/javascript'></script>
<script src='https://alexgorbatchev.com/pub/sh/current/scripts/shBrushVb.js' type='text/javascript'></script>
<script src='https://alexgorbatchev.com/pub/sh/current/scripts/shBrushXml.js' type='text/javascript'></script>
<script src='https://alexgorbatchev.com/pub/sh/current/scripts/shBrushPerl.js' type='text/javascript'></script>
<script language='javascript'>
SyntaxHighlighter.config.bloggerMode = true;
SyntaxHighlighter.config.clipboardSwf = 'https://alexgorbatchev.com/pub/sh/current/scripts/clipboard.swf';
SyntaxHighlighter.all();
</script>
但是当我通过 HTTP 查看页面时,浏览器告诉我我正在从第二个 HTTPS 页面请求不安全的 HTTP 资源。
https://mrpmorris.blogspot.co.uk/2017/06/loading-assembly-from-specific-path.html
如果我在 Chome 控制台中右键单击 alexgorbatchev 链接并选择 Open in new link,它会将我带到一个不安全的页面,如果我将 https:// 添加到 URL 的开头,它会安全加载。
当标记明确指出https 时,为什么 Chrome 和 MS Edge 会尝试通过 http 获取这些资源?
【问题讨论】:
-
与包含在 html 实体引号中的 clipboardSwf url 有什么关系?
-
面对同样的问题已经有一段时间了(blog)。 CDN 解决方案非常适合这个问题,尽管我怀疑版本管理是如何工作的。