te')); return $arr; } /* 遍历用户所有主题 * @param $uid 用户ID * @param int $page 页数 * @param int $pagesize 每页记录条数 * @param bool $desc 排序方式 TRUE降序 FALSE升序 * @param string $key 返回的数组用那一列的值作为 key * @param array $col 查询哪些列 */ function thread_tid_find_by_uid($uid, $page = 1, $pagesize = 1000, $desc = TRUE, $key = 'tid', $col = array()) { if (empty($uid)) return array(); $orderby = TRUE == $desc ? -1 : 1; $arr = thread_tid__find($cond = array('uid' => $uid), array('tid' => $orderby), $page, $pagesize, $key, $col); return $arr; } // 遍历栏目下tid 支持数组 $fid = array(1,2,3) function thread_tid_find_by_fid($fid, $page = 1, $pagesize = 1000, $desc = TRUE) { if (empty($fid)) return array(); $orderby = TRUE == $desc ? -1 : 1; $arr = thread_tid__find($cond = array('fid' => $fid), array('tid' => $orderby), $page, $pagesize, 'tid', array('tid', 'verify_date')); return $arr; } function thread_tid_delete($tid) { if (empty($tid)) return FALSE; $r = thread_tid__delete(array('tid' => $tid)); return $r; } function thread_tid_count() { $n = thread_tid__count(); return $n; } // 统计用户主题数 大数量下严谨使用非主键统计 function thread_uid_count($uid) { $n = thread_tid__count(array('uid' => $uid)); return $n; } // 统计栏目主题数 大数量下严谨使用非主键统计 function thread_fid_count($fid) { $n = thread_tid__count(array('fid' => $fid)); return $n; } ?>javascript - How much of an effect can different operating systems have on displaying web pages? - Stack Overflow
最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How much of an effect can different operating systems have on displaying web pages? - Stack Overflow

programmeradmin4浏览0评论

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.

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?

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

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.

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?

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

Share Improve this question asked Mar 24, 2012 at 21:07 MaxxMaxx 4,0728 gold badges34 silver badges38 bronze badges 2
  • Recently, a similar question was asked: stackoverflow./q/9710412. From my own experience, there can be some differences between browsers across different OSs, but these are usually concerning very specific features. More dynamic content (including plugins) increases the chance on inpatibilities. The chances are still slim, though. – Rob W Commented Mar 24, 2012 at 21:16
  • From my practice: browsers of one version of IE work equally on different versions of Windows, I think it is the same rule for Ubuntu/Mac OS. Differences can occur with different system bugs for different OSes (when browser falls) but not with Javascript/DOM/HTML layer. – sergzach Commented Mar 24, 2012 at 21:22
Add a ment  | 

3 Answers 3

Reset to default 10

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-mon to least-mon, from my personal experience

  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.

10 years ago, this answer would have been a resounding yes. For instance, IE5 on the Mac was a very different code base than on Windows, and rendered things quite a bit different. But, with modern browsers this is generally not so much the case.

There are still some minor differences. For instance, safari on the Mac (not sure about FF) renders with mac-styled controls, which can have different sizes, borders, font-sizes, etc.. This can cause subtle rendering problems between platforms, but generally not anything to worry about unless a single pixel can mess up your design.

Fonts are another issue, because different fonts exist on different systems, and they have different metrics.

Javascript rendering can be an issue between browsers, but not usually the same version on different OS's.

The latest fad is hardware acceleration, which can be different between OS's, but should generally just result in speed of rendering differences..

That all depends on the browser manufacturer, but in my experience they are pretty close to the same cross platform, aside from some UI stuff. Ubuntu is probably the OS they pay the least attention to and Firefox for instance works exactly the same on Windows and Ubuntu.

Web Development in terms of the operating system your server is running is an issue and is not cross platform when it es to interacting with the file system, but that's not really your question.

发布评论

评论列表(0)

  1. 暂无评论