具有www或没有www的默认网址的优缺点是什么? [英] What are the pros and cons of a default URL with www or without www?

查看:244
本文介绍了具有www或没有www的默认网址的优缺点是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们需要将默认网址设为唯一的名称。如果是www,那么没有前缀,反之亦然。所以决定要用www或没有前缀。

We need to default URL to unique name. If it is www then with no prefix or vice versa. So decision to be made is either stick with www or with no prefix.

没有为所有子域设置前缀Cookie。它的其他缺点是什么?还是有好处?

基本上,我们需要OpenID,因为OpenID会使用户看起来不同,如果他们来自www或没有前缀。

Basically we need this for OpenID as OpenID will make users look different if they came from www or with no prefix.

由于我们的网站是新的,所以我们可以去任何一个。另外,域名的外观不是什么大问题。

As our site is new so we can go with either one. Also, how the domain name looks is not much of a concern.

推荐答案

通过 www 子域名,您可以在传递静态内容时遇到性能问题,如下所述: http://developer.yahoo.com/performance/rules.html#cookie_free 。据我了解,如果您使用 http://example.com/ http://static.example.com 对于静态内容,您在主域上设置的任何Cookie将被传递到您的静态子域的请求。

By not using the www subdomain, you can suffer a performance hit when delivering static content, as noted here: http://developer.yahoo.com/performance/rules.html#cookie_free. As I understand it, if you use http://example.com/ and http://static.example.com for static content, any cookies you set on the main domain will be passed with requests to your static subdomain.

这可以通过购买不同的域静态内容。然而,这可以通过使用 www 子域来处理。

This can be avoided quite easily, by buying a distinct domain for static content. However, this can certainly be dealt with by using a www subdomain.

然后再次,这是一个非常小的con,并且真正只有在处理高需求网站时才会发挥作用。 (例如,Digg使用 http://digg.com http://*.diggstatic.com

Then again, this is a very minor con, and really only comes into play when you're dealing with a high-demand site. (For example, Digg uses http://digg.com and http://*.diggstatic.com).

最后,我会说这是一个小问题,如果性能开始受损,可能会被处理。不要过早优化,而且所有这些...

Ultimately, I would say that this is such a minor problem that it can probably be dealt with if performance starts to suffer. Don't optimize prematurely, and all that...

而且,作为@Tomas Lycken指出,请确保您帐户 www 即使不使用子域名。

And, as @Tomas Lycken points out, make sure you account for www even if you don't use the subdomain.

这篇关于具有www或没有www的默认网址的优缺点是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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