百度 添加浏览器url_现在在现代浏览器中是否真的需要在网站URL中添加“ www”?...

百度 添加浏览器url

百度 添加浏览器url

omitting-www-from-website-urls-00

When we visit a website using our favorite browser, we usually just type in the basic part of the URL and ‘arrive’ at the desired location without any problems. But have we reached a point where we can start omitting ‘www’ from the URLs for all websites now, or is it still necessary to add it in?

使用最喜欢的浏览器访问网站时,通常只需输入URL的基本部分,然后“到达”所需的位置就不会出现任何问题。 但是,是否已经达到可以立即从所有网站的网址中省略“ www”的地步,还是仍然有必要添加它?

Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites.

今天的“问答”环节由SuperUser提供,它是Stack Exchange的一个分支,该社区是由社区驱动的Q&A网站分组。

问题 (The Question)

SuperUser reader Celeritas wants to know if adding ‘www’ to website URLs makes a difference or not:

超级用户读者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前面是否有意义? 转到“ www.facebook.com”或“ www.cbc.ca”时,省略“ www”有什么好处或不同之处?

Is it really necessary to add ‘www’ to website URLs now, or could you just omit it when browsing the internet and not experience any problems?

是否真的需要立即在网站URL中添加“ www”,还是在浏览Internet时就忽略它而不会遇到任何问题?

答案 (The Answer)

SuperUser contributor Synetech has the answer for us:

超级用户贡献者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.

这与浏览器无关。 它与网络服务器有关。 网络服务器是一台计算机(甚至是多台计算机),用于接收网页查询并发送适当的数据。 URL包含几个部分,其中之一是Web服务器的名称或地址。

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.

许多公司不仅托管Web服务器,还可以运行FTP服务器,数据库服务器,邮件服务器等。 这些可以从与Web服务器相同的计算机上托管,也可以在不同的计算机上托管。

In the past, it was common to specify the difference via a prefix for consistency. 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:

过去,通常通过前缀指定差异以保持一致性。 因此,例如,Acme Industries可以购买域名“ acme.org”,然后设置一台或多台计算机来承载它们所提供的不同服务。 如果要使用其中一项服务,请输入适当的主机名:

omitting-www-from-website-urls-01

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 organizations set up a rule to have the web-server handle connections to the hostname on port 80 (the “web port”), or redirect it to another system if the web-server is a different machine.

那么,为什么没有“ www”仍然可以正常工作呢? 因为大多数Web服务器都允许您接受不同的URL并根据需要重定向它们。 为了方便用户,大多数公司和组织都设置了一个规则,使Web服务器处理与端口80(“ Web端口”)上的主机名的连接,如果Web服务器与主机名不同,则将其重定向到另一个系统机。

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:

也可以通过端口来区分要访问的服务或机器,但是它需要专门在名称中包括它,因此它实际上并没有比使用前缀更好:

omitting-www-from-website-urls-02

Sometimes the scheme can perform this function:

有时,方案可以执行此功能:

omitting-www-from-website-urls-03

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.

使用方案同样有效,并且可以使用适当的软件自动完成(例如,浏览器将添加“ http://”,电子邮件客户端将添加“ pop://”等)。 但是,对于每种类型的服务器都没有正式的方案,发明一个方案也不理想,因为它需要软件来支持。

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”的必要性变得越来越低,但是它并不是通用的,并且某些站点仍然需要它,因为它有助于使事物井井有条。

Most of the time we can happily (and easily) omit typing in the ‘www’ portion of URLs for our favorite websites, but there is always a possibility you may encounter the ‘rare’ website that still requires it.

在大多数情况下,我们可以(轻松地)忽略我们喜欢的网站的URL的“ www”部分,但是总有可能您遇到仍然需要它的“稀有”网站。



Have something to add to the explanation? Sound off in the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread here.

有什么补充说明吗? 在评论中听起来不错。 是否想从其他精通Stack Exchange的用户那里获得更多答案? 在此处查看完整的讨论线程

翻译自: https://www.howtogeek.com/179378/is-it-really-necessary-to-add-www-to-website-urls-in-modern-browsers-now/

百度 添加浏览器url

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值