当我们使用我们最喜欢的浏览器访问一个网站时,我们通常只需输入URL的基本部分,就可以毫无问题地“到达”所需的位置。但是,我们现在是否已经到了可以开始从所有网站的URL中省略“www”的地步,或者仍然有必要添加它?
今天的问答环节是由SuperUser提供的,SuperUser是Stack Exchange的一个分支,是一个由社区驱动的问答网站分组。
超级用户读者Celeritas想知道在网站URL中添加“www”是否有区别:
In modern web browsers, is there any point in putting ‘www’ in front of a website URL that uses it? When going to ‘www.facebook.com’ or ‘www.cbc.ca’, is there any benefit or difference made by omitting the ‘www’?
现在是否真的有必要将“www”添加到网站url中,或者您可以在浏览互联网时忽略它而不遇到任何问题?
超级用户贡献者Synetech为我们提供了答案:
It usually doesn’t, but it could.
This has nothing to do with the browser; it has to do with the web-server. The web-server is a computer (or even multiple computers) which receive queries for web-pages and send the appropriate data. A URL includes several parts, one of which is the name or address of the web-server.
Many companies host more than just a web-server, they may also run an FTP-server, a database-server, a mail-server, and so on. These could be hosted from the same machine as the web-server or on different machines.
In the past, it was common to specify the difference via a prefix for c***istency. So for example, Acme Industries might buy the domain-name ‘acme.org’, then set up one or more computers to host the different services they have. When you want to use one of the services, you enter the appropriate host name:
So why does it still work without ‘www’? Because most web-servers allow you to accept different URLs and redirect them as necessary. For the convenience of users, most companies and organizati*** set up a rule to have the web-server handle connecti*** to the hostname on port 80 (the “web port”), or redirect it to another system if the web-server is a different machine.
Differentiating the service or machine being accessed can also be done through the port, but it requires specifically including it in the name, so it’s not really any better than using prefixes:
Sometimes the scheme can perform this function:
Using schemes works as well and can be done automatically using the appropriate software (e.g., a browser would add ‘http://’, an email client would add ‘pop://’, etc.). But there are not official schemes for every type of server that can exist, and inventing one is not ideal because it would require software to support it.
It’s becoming less and less necessary to include ‘www’, but it is not universal, and some sites still require it because it helps keep things organized.
大多数情况下,我们可以愉快地(很容易地)省去在我们最喜欢的网站的网址的“www”部分键入,但总有一种可能性,你可能会遇到“罕见”的网站,仍然需要它。
有什么要补充的解释吗?在评论中发出声音。想从其他精通技术的Stack Exchange用户那里了解更多答案吗?在这里查看完整的讨论主题。
... 许多antrivus公司提供免费的浏览器扩展,您无需使用完整的产品即可安装。让我们看看Avira的浏览器安全(ABS)扩展,看看它是如何与其他强大的web保护相媲美的。 ...
Web scraper自动收集通常只能通过浏览器访问网站才能访问的信息和数据。通过自主地这样做,web抓取脚本在数据挖掘、数据分析、统计分析等方面打开了一个可能性的世界。 ...
...,Google单方面决定删除熟悉的URL的某些重要功能,以减少浏览器地址栏的混乱。 ...
...本机Mac应用程序。这意味着每个应用程序都有一个自己的浏览器,带有单独的cookies和设置。 ...
... 理想情况下,当提要的URL输入address字段时,浏览器将识别RSS提要,而不是显示脚本的内容。 ...
... 按Enter键将在默认web浏览器中打开一个新页面,其中包含搜索结果。要查看支持的关键字和配置详细信息的完整列表,请转到“首选项”>“功能”,然后单击“Web搜索”在右侧窗格中...
...togeek) August 1, 2019 相关:如何总是显示完整的网址在谷歌浏览器 谷歌认为这些细节并不重要。通过查找网站名称旁边的锁,或者更准确地说,在未加密的http://地址上看不到“不安全”指示符,您仍然可以判断是否使用了加密的h...
当你在浏览器中输入地址时,很多事情都发生在幕后。其中大部分是由您键入的URL的各个部分决定的。让我们仔细看看。 一个URL可以由一堆不同的部分组成。有一个主机名映射到internet上特定资源的IP地址,还有一堆附加信息,...
Chrome是很多人的首选浏览器,如果你想让你的搜索游戏更强大,有一种简单快捷的方法可以直接从地址栏(或者谷歌称之为Omnibox)搜索所有你喜欢的网站。我们来谈谈。 相关:如何从Chrome的地址栏直接搜索Google Drive 我们已经...