2017-07-01 28 views
0

我在blogger.com主题的head部分添加了以下HTML。为什么从blogger.com通过HTTP获取SyntaxHighlighter

<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 = &#39;https://alexgorbatchev.com/pub/sh/current/scripts/clipboard.swf&#39;; 
    SyntaxHighlighter.all(); 
</script> 

但是当我通过HTTP浏览网页浏览器告诉我,我请求不安全HTTP资源从第二HTTPS页。

https://mrpmorris.blogspot.co.uk/2017/06/loading-assembly-from-specific-path.html

如果我用鼠标右键单击丁目控制台alexgorbatchev链接并选择Open in new link需要我到不安全的网页,如果我添加https://到URL将其牢固加载启动。

为什么Chrome和MS Edge在标记明确指出https时试图通过http获取这些资源?

+0

任何与该clipboardSwf URL重定向被包括在HTML实体化报价? – pinkfloydx33

回答

1
$ curl -I https://alexgorbatchev.com/pub/sh/current/scripts/shBrushPerl.js -k 
HTTP/1.1 302 Moved Temporarily 
... 
Location: http://agorbatchev.typepad.com/pub/sh/3_0_83/scripts/shBrushPerl.js 
... 

你可以看到它实际上被重定向到TypePad.com。这背后有一个“酷”的故事。在带宽昂贵的黑暗日子里,我在这些脚本上获得了100多GB的流量,每月的开销超过100美元。我将这些文件移动到免费托管服务,但我不希望所有现有链接到alexgorbatchev.com打破,所以我设置了重定向。

我也许应该修复使用相同的协议请求:)

+0

谢谢你,图书馆和你的答案! –

相关问题