TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Why are commas not allowed in urls?

8 点作者 tronium将近 11 年前
I've always been curious why certain characters (e.g. commas) haven't been allowed in the url. I've never seen one used in a specialized way at all, are they just nonexistent in usage? If so, why?

2 条评论

daveslash将近 11 年前
My best guess. From RFC 3986 (link below)<p><i>For example, the semicolon (&quot;;&quot;) and equals (&quot;=&quot;) reserved characters are often used to delimit parameters and parameter values applicable to that segment. The comma (&quot;,&quot;) reserved character is often used for similar purposes. For example, one URI producer might use a segment such as &quot;name;v=1.1&quot; to indicate a reference to version 1.1 of &quot;name&quot;, whereas another might use a segment such as &quot;name,1.1&quot; to indicate the same.</i><p><a href="http://www.ietf.org/rfc/rfc3986.txt" rel="nofollow">http:&#x2F;&#x2F;www.ietf.org&#x2F;rfc&#x2F;rfc3986.txt</a><p>EDIT: This RFC is for URIs and your question was about URLs. URLs are generally considered a subset of URIs, but according to this SO answer, that might be open to debate. <a href="http://stackoverflow.com/questions/176264/whats-the-difference-between-a-uri-and-a-url" rel="nofollow">http:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;176264&#x2F;whats-the-differen...</a>
评论 #7824611 未加载
rahimnathwani将近 11 年前
Vignette StoryServer, a CMS from back in the day, had commas in all (or almost all) the URLs it generated.<p><a href="http://en.wikipedia.org/wiki/StoryServer" rel="nofollow">http:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;StoryServer</a>