干净的URL是后端还是前端 [英] Are clean URLs a backend or a frontend thing

查看:115
本文介绍了干净的URL是后端还是前端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您认为..是后端或前端纪律"的纯净URL

What do you think.. are clean URLs a backend or frontend 'discipline'

推荐答案

现在,Firefox的多功能框地址栏可以用于搜索浏览历史记录,这使用户可以更轻松地在历史记录中搜索以前访问过的网站,因此拥有清晰的网址可以帮助用户更轻松地在其历史记录中查找站点.

Now that Firefox's Awesome bar and Google Chrome's Omnibox address bars can be used to search the browsing history it makes it much easier for users to search their history for previously visited sites, so having clean urls may help the user find sites in their history more easily.

确保页面具有适当的标题很重要(因为两个浏览器都搜索标题和url),但是通过确保url中也包含相关的关键字,当在地址栏中键入这些关键字时,网址将更有可能在建议中显示较高的位置,因为关键字将在网址和标题中两次匹配.

Making sure the page has an appropriate Title is important (as both browsers search the title as well as the url) but by making sure the url has relevant keywords in it as well, when those keywords are typed in the address bar the urls will be more likely to show up higher in the suggestions as the keyword will be matched twice, in the url and the title.

此外,一旦用户键入了站点名称,他们将获得该站点的示例URL,然后可以将其用作缩小搜索范围的模板.因此,在网址中针对网站的不同部分或动作使用动词和名词,将有助于用户将搜索范围缩小到他们感兴趣的网站部分,例如stackoverflow的/questions//tag/部分,或docs.google.com/doc末尾的"/doc",可用于查看< Google文档*上的文档页面.

Also, once a user has typed the name of a site they will be presented with example urls from the site which they can then use as a template for narrowing down their search. So using verbs and nouns in the url for different sections or actions of the site will aid the user to narrow their search to just the part of the site they are interested in, e.g. the /questions/ or /tag/ sections of stackoverflow, or the "/doc" at the end of docs.google.com/doc that can be used to view just document pages on Google docs*.

由于Firefox和Chrome都搜索在地址栏中键入的每个空格分隔的单词,因此可能会争辩说,搜索URL并非完全可读,而是允许用户实际阅读关键字他们对网址感兴趣的噪音"数量应保持在最低水平.

Since both Firefox and Chrome search for each space separated word typed into the address bar, it could be argued that it isn't necessary for searching that the url be completely human readable, but to allow the user to actually read the keywords they are interested in from the url the amount of "noise" should be kept to a minimum.

*,其格式为http ://docs.google.com/Doc?id = gibberish

* which are of the form http://docs.google.com/Doc?id=gibberish

这篇关于干净的URL是后端还是前端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆