为什么 www.domain.com 和 domain.com 的网站宽度不同?
如果您在两个不同的选项卡中打开我网站的两个版本,请转至 www.compversions.com 和 compversions.com,并假设您的分辨率至少为 1680 x 1050,您将看到该网站以两种不同的方式呈现尺寸。
它被设计为逐步增强,但是“www”和域中没有“www”之间有什么区别,这会使网站在完全相同的分辨率显示器上显示不同的大小?
任何帮助将不胜感激。
谢谢。
Edit1:最初的问题出现在 Windows 7、Chrome 最新版本上。我在 Mac 上用最新的 Safari 进行了测试,没有出现这个问题。但 Twitter 计数器和 Google+ 计数器确实显示了两个不同的数字。
这是 compversions.com 的屏幕截图 - 正如您所看到的,一切都稍大一些 - 特别是白色的中间部分。
这是 www.compversions.com 的截图 - 这个稍微小一点,尤其是白色的中间部分。
If you open two versions of my site in two different tabs, go to www.compversions.com and compversions.com, and also assuming that your resolution is at least 1680 x 1050, you will see the site rendered in two different sizes.
It was designed to be progressively enhanced, but what's the difference between 'www' and not having that on the domain that would make the site be different sizes on the exact same resolution monitor?
Any help would be greatly appreciated.
Thanks.
Edit1: The original problem is seen on Windows 7, Chrome latest build. I tested on a Mac in the latest Safari and it doesn't have that problem. But the Twitter counter and Google+ counter does show two different numbers.
This is the compversions.com screenshot - as you can see, everything is slightly bigger - especially the white middle part.
This is the www.compversions.com screenshot - this one is slightly smaller, especially the white middle part.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
您显然不小心使用 Ctrl+Scrollwheel 缩放了非 www 页面。按 Ctrl+0 重置缩放级别。浏览器会记住每个主机的缩放级别。这与您网站提供的 HTML/CSS 无关。
You've apparently accidently zoomed the non-www one in using for example Ctrl+Scrollwheel. Press Ctrl+0 to reset the zoom level. The browser remembers the zoom level for each host. This has nothing to do with HTML/CSS served by your site.
我看不出它们之间有什么区别,但是通过 www 或非 www 访问同一页面可能会导致搜索引擎出现重复内容问题。您可能应该使用 301 重定向将非 WWW 重定向到 WWW 版本,反之亦然。
这可能导致的直接问题是您的 Google+ 和推文按钮显示两个网址的不同计数,因为它们将它们计为两个不同的页面。
如果您发现它们不同,您可能只需要清除浏览器缓存即可。如果您仍然遇到问题,在不同的计算机上查看页面应该会显示它们在视觉上是相同的。
I don't see a difference between them, but having the same page accessible through www or non-www can create duplicate content issues with search engines. You should probably redirect either your non-WWW to the WWW version or vice versa using a 301 redirect.
The immediate issue this is likely causing is your Google + and Tweet buttons show different counts for the two URLs, since they are counting them as two different pages.
If you're seeing them as different, you may just need to clear your browser cache. If you're still having the issue, looking at the pages on a different computer should show them as visually the same.
除非子域“www”指向服务器上的不同文件夹,否则它们应该是相同的。
Unless the subdomain "www" is pointing to a different folder on your server, they should be identical.
刚刚检查了Chrome版本13.0.782.112 beta,子域之间没有区别。还检查了是否下载了正确的css文件,并且没有404。
您在哪个浏览器中看到这些结果?
Just checked in Chrome version 13.0.782.112 beta and there is no difference between the sub domains. Also checked that the correct css files were downloaded, and there were no 404s.
Which browser are you seeing these results in?
有趣的是...我发现两个 URL 的尺寸没有差异,但我确实看到两者之间的推文计数和宣传量计数有所不同。将继续调查。
Interesting...I see no difference in the dimensions of the two URL's, but what I do see is that the Tweet count and Publicity Meter counts vary between the two. Will continue to look into it.