如何在 URL 中包含 space

How is it possible to include a space in a URL

当使用 Chatstep, I noticed when typing a room name, it automatically updates in the URL bar, plus spaces are allowed! You can even share the link with a space, and the recepient can join seamlessly. Here is an example of what I'm talking about: "https://chatstep.com/#this 时是 space 测试”(只需复制并粘贴到引号内,SE 会弄乱可点击的 link)

我认为 link 中的 space 是不可能的, 怎么可能?

如果 URL 包含任何类型的特殊字符(包括 space),则始终需要对其进行编码。这通常用 percent encoding 完成,但对于 space 字符,可以使用加号“+”的特殊编码。 (文字“+”本身是编码前的保留字符,需要编码为“%2B”。)

但是,现代浏览器在处理 URL 时表现出一定的智能,并且可以在必要时透明地应用该编码。如果您使用的是 Firefox,请尝试使用 Live HTTP Headers 或 Firebug 查看当您单击 link.

时实际发送到服务器的请求