我正在做一个电子商务项目。默认情况下,站点的某些部分是HTTP。其他页面,比如结账页面,默认情况下是HTTPS。在HTTPS页面上,我在Chrome的控制台上得到了这样的信息:
[blocked] The page at https://store-ws3q9h.mybigcommerce.com/checkout.php?tk=c99fa39e007db6376dcddaac68695c22 ran insecure content from http://fonts.googleapis.com/css?family=PT+Sans.
[blocked] The page at https://store-ws3q9h.mybigcommerce.com/checkout.php?tk=c99fa39e007db6376dcddaac68695c22 ran insecure content from http://fonts.googleapis.com/css?family=Open+Sans:400italic,400,300,700.
[blocked] The page at https://store-ws3q9h.mybigcommerce.com/checkout.php?tk=c99fa39e007db6376dcddaac68695c22 ran insecure content from http://fonts.googleapis.com/css?family=Patua+One.
字体在文档头上的链接方式如下:
<link href='http://fonts.googleapis.com/css?family=PT+Sans' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,400,300,700' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Patua+One' rel='stylesheet' type='text/css'>
到目前为止,它在我测试过的其他浏览器上看起来都没问题。
发布于 2013-08-03 06:11:10
从URL中删除协议,并让浏览器确定它:
<link href="//fonts.googleapis.com/css?family=PT+Sans" ...
如果您的页面是HTTPS,字体将从HTTPS URL加载。如果页面是HTTP,它将从HTTP URL加载。
https://stackoverflow.com/questions/18026809
复制相似问题