用数字开头会有什么问题?
1
icecoffee Dec 5, 2014 http://ux.stackexchange.com/questions/16101/why-do-so-many-websites-have-the-restriction-of-user-names-starting-with-a-lette
An advantage of this restriction is URLs. If a user's ID is 177896 and their username is H4rold, then you can have 2 URLs to reach this user depending on which information you have at hand: http://example.com/user/177896 http://example.com/user/H4rold Then, on that page, they determine how to look up the user by checking whether the first character is a letter or a digit. Alternatively, they could just force you to include at least one non-numeric character, though that increases the complexity of the check from a character comparison to either a regular expression or a looping multiple-character comparison. However, not all websites with these restrictions take advantage of this flexibility. My theory is that web developers have seen this restriction so often that they just took it as the norm rather than investigating its purpose... We do that, sometimes. |
3
7colcor Dec 5, 2014
看来本站是例外
|
5
FrankFang128 Dec 5, 2014
@icecoffee 用 /userid/123123 和 /username/123123 不就好了……
|
8
hahastudio Dec 5, 2014
我觉得不是不礼貌,而是应该避免,毕竟用户并不需要(或者说不该)知道他/她的 ID,如果你有 username 的话
|
9
Bitex OP @hahastudio 同感
|
10
ivanlw Dec 5, 2014
楼主如果有学过编程的话……
|
12
whywhywhy Dec 6, 2014
QQ就是最好证明数字账号没有任何问题的例子 没有之一
|