博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
百度 添加浏览器url_现在在现代浏览器中是否真的需要在网站URL中添加“ www”?...
阅读量:2516 次
发布时间:2019-05-11

本文共 4458 字,大约阅读时间需要 14 分钟。

百度 添加浏览器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 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? .

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

翻译自:

百度 添加浏览器url

转载地址:http://jdfwd.baihongyu.com/

你可能感兴趣的文章
找了一个api管理工具
查看>>
Part 2 - Fundamentals(4-10)
查看>>
使用Postmark测试后端存储性能
查看>>
NSTextView 文字链接的定制化
查看>>
第五天站立会议内容
查看>>
CentOs7安装rabbitmq
查看>>
(转))iOS App上架AppStore 会遇到的坑
查看>>
解决vmware与主机无法连通的问题
查看>>
做好产品
查看>>
项目管理经验
查看>>
笔记:Hadoop权威指南 第8章 MapReduce 的特性
查看>>
JMeter响应数据出现乱码的处理-三种解决方式
查看>>
获取设备实际宽度
查看>>
Notes on <High Performance MySQL> -- Ch3: Schema Optimization and Indexing
查看>>
Alpha冲刺(10/10)
查看>>
数组Array的API2
查看>>
为什么 Redis 重启后没有正确恢复之前的内存数据
查看>>
No qualifying bean of type available问题修复
查看>>
第四周助教心得体会
查看>>
spfile
查看>>