我们在模板中使用绝对路径,即:
<link rel="stylesheet" href="/media/css/ui.css?v=3" />
当我试图打开https页面时,出现以下错误:
[blocked] The page at 'https://{{ full_site }}/{{secure_page}}' was loaded over HTTPS,
but ran insecure content from 'http://{{full_site }}/media/css/ui.css?v=3':
this content should also be loaded over HTTPS.
但路径 https://{{full_site }}/media/css/ui.css?v=3
是可用的...
告诉我,为什么Chrome在https页面上尝试加载http内容?如何强制它在相对路径上加载https脚本?
更新:页面在Firefox中完美加载。因此,这只是Chrome的问题。所有路径都是相对的。
ui.css
中是否有加载HTTP内容的url属性? - Sachin Jain