url (route) design

I am starting with web development. I looked at the URL design of a few websites, especially github and stack overflow. A user page on github is of the form `github.com/` (e.g. `github.com/roma1n`). This strikes me as requiring careful reservation of top-level identifiers, i.e. there cannot be a user `explore` in github, because `github.com/explore` shows a list of trending/interesting repositories. It also seems hard to extend once usernames that would make useful page names (e.g. `latest`, `all`) have been taken up by users. Stackoverflow seems to go on the opposite route, where a user page is of the form `stackoverflow.com//`. This seems to add redundancy to the address, unless multiple users with the same nickname are allowed (e.g. to make life easier when identifying through other providers such as OpenId?). What are the pros and cons of each solution, (and of the other obvious ones such as `example.com/users/` or `example.com/users/`)? Is there a current best practice or reasonable default?

以上就是url (route) design的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » WebStorm

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏