html - 是//sub.sitename.com/thing/standard 吗?

标签 html browser standards

Possible Duplicate:
Is it valid to replace http:// with // in a <script src=“http://…”>?

我刚刚看到//sub.sitename.com/thing/在一个网址中。这是标准吗?我认为它在访问其他站点时会保留该方案(http 与 https),但我不知道。这是标准吗?还是 html 世界中的罪恶?

最佳答案

答案是肯定的,这是由RFC 3986标准化的§ 4.2:

A relative reference takes advantage of the hierarchical syntax (Section 1.2.3) to express a URI reference relative to the name space of another hierarchical URI.

[...]

A relative reference that begins with two slash characters is termed a network-path reference; such references are rarely used.

关于html - 是//sub.sitename.com/thing/standard 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14669243/

相关文章:

standards - W3C 文档状态

xml - 我应该学习 XML 1.0 还是 XML 1.1?

javascript - 如何使用 AngularJS 过滤对象数组?

Java脚本;非常简单的幻灯片

php - php表格中行的颜色

javascript - Mocha 浏览器全局变量,它们在哪里?

browser - 在 Firefox 或 chrome 中启动外部程序

google-chrome - Chrome 32 更新中缺少向上/向下滚动条箭头按钮

c++ - 阴影和 GCC -Wshadow

css - div定位中的div问题