【发布时间】:2025-12-04 02:55:02
【问题描述】:
<!DOCTYPE html>
<html>
<head>
<link rel="canonical" href="http://www.example.com">
</head>
</html>
查看这段代码:规范的 href 是绝对的,页面是静态的,协议是显式声明的。
但是,如果我导航到 https://www.example.com 并检查页面代码,我会看到浏览器(尝试使用 chrome 和 firefox)将该 href 重写为 https://www.example.com。
为什么会这样?
我的实际问题是共享工具,我想在获取共享统计信息时忽略协议。
【问题讨论】:
标签: html http https canonical-link