开发者

Upper case letters in a URL, should it be advertised that way?

Currently, our URL's look something like this:

h开发者_运维百科ttp://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?


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.


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 "/".
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜