不同操作系统对显示网页有多少效果? [英] How much of an effect can different operating systems have on displaying web pages?

查看:137
本文介绍了不同操作系统对显示网页有多少效果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看到很多用户在这个网站提供操作系统规范描述Web开发错误,我看到一些事情在一个操作系统,但不是另一个工作。

I've seen a lot of users on this site provide operating system specs when describing web development bugs and I've seen a few instances of things working on one OS but not another.

在不同版本的windows上,我们说IE6有什么不同?或者与ubuntu完全相同的版本firefox而不是mac?

Is there an actual difference in what gets processed by let's say IE6 on different versions of windows? Or the exact same version of firefox on ubuntu as opposed to mac?

这可能是一个noob问题,但我真的很好奇。

This may be a noob question, but I'm really curious.

推荐答案

网站中可能出现的跨OS操作系统错误基本上有四种类型(无意识地忽略了Web开发人员嗅探用户代理和与无法识别的结果相冲突,或者使用只能在一个平台上工作的插件,例如Silverlight)。

There are essentially 4 categories of cross-OS bugs that can occur in website (unintentionally; ignoring things like the web developer sniffing the user agent and screwing with unrecognized results, or using a plugin that can only work on one platform, such as Silverlight). Ordered in the most-common to least-common, from my personal experience


  1. 关于字体和字距假设的假设 - - 如果用户的操作系统与您自己的操作系统不匹配,并且指定了您的系统没有的字体,则文本将不会有完全相同的长度和可能的高度,即使指定特定的点大小(小写 m'应该匹配,但所有其他字符可以不同,如大写的高度)。这可能会对固定大小的布局造成严重破坏,尤其是对于预期只有一行长的标题。最近,这可以通过购买webfont(通常包括旧的IE和新的现代标准Web字体),并在您的CSS中使用它,托管用户下载的字体,可以减轻。

  2. 表单元素的假设
  3. strong> - 由于这些HTML元素是由操作系统直接创建的,而不是由浏览器创建的,即使对于同一个浏览器,它们可以看起来不同,在操作系统之间有不同的大小和行为。为这些元素设置样式可以减少可变性,但是某些表单元素(如< input type =file> )无法设置样式。
  4. Buggy插件 - 即使插件存在于所有操作系统(如Flash)中,通常它们最适合Windows,然后Linux和Mac打出它的第二位(通常更多的努力投入到Mac端口,但在Linux上可能有Wiki指南,以使其工作更好,发行版包装商可以使用这些技巧,当自动安装插件为你)。我知道的唯一解决方案是,如果你是一个Windows开发人员,有一个Linux发行版的VirtualBox映像,如Ubuntu或Fedora,你测试你的网站,看看插件执行时,当你添加所有的铃声和
  5. 增加,特征/缺陷奇偶校验间隙在平台之间变宽。一般来说,浏览器的原生操作系统是最好的,其次是最后的平台使用它。我很少看到回归,因此一旦 在浏览器的所有操作系统上工作,它基本上保持这种方式。你必须做一些真正特别的事情来实现这一点。
  1. Assumptions about fonts and kerning -- If the user's operating system does not match your own, and you specify a font that your system has that theirs does not, the text will not have exactly the same length and possibly height, even when specifying a specific point size (the lowercase 'm' should match, but all other characters can differ, like the height of the capitals). This can wreak havoc on fixed-sized layouts, especially with headings that are expected to be only one line long. Lately, this can be mitigated by buying a "webfont" (usually both old IE and the new modern standard web font are included) and using that in your CSS, hosting the font for the user to download. This can produce a "flash" as the rendering is switched to it once downloaded, though, so you definitely need to specify a long caching time.
  2. Assumptions about form elements -- Since these HTML elements are created by the operating system directly, rather than by the browser, even for the same browser they can look different, have different sizes and behaviors, between operating systems. Styling these elements reduces the variability, but some of the form elements (like the <input type="file">) cannot be styled. Just give them a large buffer in your layout.
  3. Buggy plugins -- Even if the plugin exists across all operating systems, like Flash, generally they work best on Windows, and then Linux and Mac fight it out for second place (usually more effort put into the Mac port, but on Linux there may be Wiki guides to get it working better, and the distro packagers may use these tricks when auto-installing the plugin for you). The only solution I know is, if you're a Windows dev, to have a VirtualBox image of a Linux distro like Ubuntu or Fedora that you test your site on, and see how poor the plugin performs when you add all of your bells and whistles, then assume that Macs are roughly the same performance.
  4. Actual bugs in the HTML renderer -- These can happen, and as the pace of browser development is increasing, the feature/bug parity gap is widening between platforms. Generally, the "native" OS of the browser does the best, followed by whichever platform uses it the most after that. I rarely see regressions, so once something is working across all OSes for a browser, it basically stays that way. You have to be doing something real special to run into this.

这篇关于不同操作系统对显示网页有多少效果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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