URL 中的大写字母是否应该这样宣传?

发布于 2024-10-12 19:47:19 字数 344 浏览 4 评论 0原文

目前,我们的 URL 看起来像这样:

http://helpdesk.ourdomain.com

最近,有人讨论将这些 URL 做广告(在出版物、网站等上),以提高可读性:

http://HelpDesk.OurDomain.com

我们的 Web 服务器使用大写元素处理对 URL 的访问正确地输入,这意味着当您访问该 URL 时,它会将 URL 重写为全部小写。然而,我总是被告知 URL 应该区分大小写。记住这一点,我认为不应该用大写字母来宣传 URL。

广告网址中包含大写字母是一种好的做法吗?为什么或为什么不呢?

Currently, our URL's look something like this:

http://helpdesk.ourdomain.com

Recently, there has been talk of advertising these URLs (in publications, on websites, etc.) to look like this for readability purposes:

http://HelpDesk.OurDomain.com

Our web server handles going to the URL with upper-case elements in it correctly, meaning when you go to that URL, it rewrites the URL to be all lower-case. However, I was always taught that URL's are meant to be case-sensitive. Keeping that in mind, I would think that advertising the URL's with upper-case letters would not be something that should be done.

Is advertising URL's with upper-case letters in it an okay practice? Why or why not?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

善良天后 2024-10-19 19:47:19

引用 W3C

URL 通常区分大小写(机器名称除外)。可能存在 URL 或 URL 的一部分,其中大小写并不重要,但识别这些可能并不容易。用户应始终注意 URL 区分大小写。

我会说不,保持小写。

Quoting the W3C:

URLs in general are case-sensitive (with the exception of machine names). There may be URLs, or parts of URLs, where case doesn't matter, but identifying these may not be easy. Users should always consider that URLs are case-sensitive.

I would say not, keep it lowercase.

缺⑴份安定 2024-10-19 19:47:19

来自 规范

比较两个 URI 以确定它们是否匹配时,客户端应该对整个 URI 使用区分大小写的逐个八位字节比较,但以下例外:

  - A port that is empty or not given is equivalent to the default
    port for that URI-reference;

    - Comparisons of host names MUST be case-insensitive;

    - Comparisons of scheme names MUST be case-insensitive;

    - An empty abs_path is equivalent to an abs_path of "/".

From the spec:

When comparing two URIs to decide if they match or not, a client SHOULD use a case-sensitive octet-by-octet comparison of the entire URIs, with these exceptions:

  - A port that is empty or not given is equivalent to the default
    port for that URI-reference;

    - Comparisons of host names MUST be case-insensitive;

    - Comparisons of scheme names MUST be case-insensitive;

    - An empty abs_path is equivalent to an abs_path of "/".
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文