2

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

I just saw //sub.sitename.com/thing/ in a url. Is this standard? I would assume it keeps the scheme (http vs https) when going to the other site but I don't know. Is this standard? or a sin in the html world?

4

1 回答 1

2

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

相对引用利用分层语法(第 1.2.3 节)来表示相对于另一个分层 URI 的名称空间的 URI 引用。

[...]

以两个斜杠字符开头的相对引用称为网络路径引用;这种引用很少使用。

于 2013-02-03T03:45:42.390 回答