head>链接[href]的协议是否与SSL有关?

时间:2013-01-25 21:31:14

标签: html canonical-link html-head

我最近开始使用//在我的网页上加载样式表,而不是在http://https://之间进行战斗。 E.g:

<link href="//example.com/styles.css" rel="stylesheet" type="text/css" />

现在我想知道是否应该为link[rel="canonical"]标签做同样的事情。 E.g:

<link rel="canonical" href="//example.com/index.html" />

1 个答案:

答案 0 :(得分:1)

如果你这样做,rel="canonical"的目的有点失败,因为页面现在有两个名称(一个用于http:,一个用于https:)。没有什么可以禁止它,但它可能不是一个好主意。

选择其中一个并将其设为规范网址。

相关问题