技术控

    今日:89| 主题:52592
收藏本版 (1)
最新软件应用技术尽在掌握

[其他] 7 chronic browser bugs plaguing the web

[复制链接]
安靜做個小孩 发表于 2016-10-18 04:53:18
290 1

立即注册CoLaBug.com会员,免费获得投稿人的专业资料,享用更多功能,玩转个人品牌!

您需要 登录 才可以下载或查看,没有帐号?立即注册

x

7 chronic browser bugs plaguing the web-1 (especially,experience,customers,documents,machines)

  Web browsers are amazing. If it weren’t for browsers, we wouldn’t be able to connect nearly as well with users and customers by pouring our data and documents into their desktops, tablets, and phones. Alas, all of the wonderful content delivered by the web browser makes us that much more frustrated when the rendering isn’t as elegant or bug-free as we would like.
  When it comes to developing websites, we’re as much at the mercy of browsers as we are in debt to them. Any glitch on any platform jumps out, especially when it crashes our users’ machines. And with design as such a premium for standing out or fitting in, any fat line or misapplied touch of color destroys the aesthetic experience we’ve labored to create. Even the tiniest mistake, like adding an extra pixel to the width of a line or misaligning a table by a bit, can result in a frustrating user experience, not to mention the cost of discovering, vetting, and working around it.
  Of course, it used to be worse. The vast differences between browsers have been largely erased by allegiance to W3C web standards. And the differences that remain can be generally ignored, thanks to the proliferation of libraries like jQuery, which not only make JavaScript hacking easier but also paper over the ways that browsers aren’t the same.
  These libraries have a habit of freezing browser bugs in place. If browser companies fix some of their worst bugs, the new “fixes” can disrupt old patches and work-arounds. Suddenly the “fix” becomes the problem that’s disrupting the old stability we’ve jerry-rigged around the bug. Programmers can’t win.
   The stability brought by libraries like jQuery has also encouraged browser builders to speed up and automate their browser updating processes. Mozilla is committed to pushing out a new version of Firefox every few months. In the past, each version would be a stable target for web developers, and we could put a little GIF on our sites claiming that they work best in, say, IE5. Now the odometer turns so quickly that a new version of Firefox will be released in the time it takes the HTML to travel from the server to the client.
  Meanwhile, we ask the browsers to do so much more. My local newspaper’s website brings my machine to its knees -- expanding popover ads, video snippets that autoplay, code to customize ads to my recent browsing history. If my daughter looks at a doll website, the JavaScript is frantically trying to find a doll ad to show me. All this magic gums up the CPU.
  All of this means that today’s browser bugs are rarer but harder to pin down. Here’s a look at the latest genres of browser bugs plaguing -- or in many cases, simply nagging -- web designers and developers.
  Layout

  The most visible browser bugs are layout glitches. Mozilla’s Bugzilla database of bugs has 10 sections for layout problems, and that doesn’t include layout issues categorized as being related to the DOM, CSS, or Canvas. The browser’s most important job is to arrange the text and images, and getting it right is often hard.
   Many layout bugs can seem small to the point of being almost esoteric. Bugzilla bug 1303580 , for instance, calls out Firefox for using the italic version of a font when CSS tags call for oblique. Perhaps only a font addict would notice that. Meanwhile Bugzilla bug 1296269 reports that parts of the letters in Comic Sans are chopped off, at least on Windows. Font designers make a distinction, and it matters to them. When they can’t get the exact right look and feel across all browsers, web designers can become perhaps a bit overly frustrated.
  There are hundreds, thousands, perhaps even millions of these bugs. At InfoWorld, we’ve encountered issues with images disappearing in our CMS editor and span tags that appear in only the DOM.
  Memory leaks

  It’s often hard to notice the memory leaks. By definition, they don’t change any visible properties. The website is rendered correctly, but the browser doesn’t clean up after the fact. A few too many trips to websites that trigger the leak and your machine slows to a crawl because all the RAM is locked up holding a data structure that will never be repurposed. Thus, the OS frantically swaps blocks of virtual memory to disk and you spend your time waiting. The best choice is to reboot your machine.
   The details of memory leak bugs can be maddeningly arcane, and we’re lucky that some programmers take the time to fix them. Consider issue 640578 from the Chronium browser stack. Changing a part of the DOM by fiddling with the innerHTML property leaks memory. A sample piece of code with a tight repeated loop calling requestAnimationFrame will duplicate the problem. There are dozens of issues like this.
   Of course, it’s not always the browser’s fault. Chromium issue 640922 , for instance, also details a memory leak and provides an example. Further analysis, though, shows that the example code was creating Date() objects along the way to test the time, and they were probably the source of the problem.
  Flash

  It’s pretty much official. Everyone has forgotten about the wonderful anti-aliased artwork and web videos that Adobe Flash brought to the web. We instead blame it for all of the crashes that may or may not have been its fault. Now it’s officially being retired, but it’s not going quickly. Even some of the most forward-thinking companies pushing web standards still seem to have Flash code in their pages. I’m surprised how often I find Flash code outside of MySpace and GeoCities websites.
  Touches and clicks

   It’s not easy to juggle the various types of input, especially now that tablets and phones generate touches that may or may not act like a mouse click. It shouldn’t be surprising then to find there are plenty of bugs in this area. The Bootstrap JavaScript framework keeps a hit list of its most infuriating bugs, and some of the worst fall in this category.
   Safari, for instance, will sometimes miss finger taps on the text in the tag ( 151933 ). Sometimes the input items ( 817822 ). Sometimes the hovering doesn’t end ( 5381673 ). Sometimes the hover event is linked to the wrong item ( 7787318 ). All of this leads to confusion and discourages the use of a pretty neat effect.
  Malware

  While it’s tempting to lay all of the blame for browser bugs on browser developers, it’s often unfair. Many of the problems are caused by malware designed to pose as useful extensions or plugins. In many cases, the malware does something truly useful while secretly stealing clicks or commerce in the background.
   The problem is that the extension interface is pretty powerful. An extension can insert arbitrary tags and code into all websites. In the right hands, this is very cool, but it’s easy to see how the new code from the extension can bump into the code from the website. What? You didn’t want to redefine the behavior of the $ function?
  This isn’t so much a bug as a deep, philosophical problem with a very cool feature. But with great power comes great responsibility -- perhaps greater than any extension programmer can muster. The best way to look at this issue is to realize it’s the one area where we, the users, have control. We can turn off extensions and limit them to only a few websites where there are no issues. The API is a bit too powerful for everyday use -- so powerful that it’s tempting to call extensions APIs the biggest bugs of all. But that would deny everything it does for us.
友荐云推荐




上一篇:Open Source is not dead: On the recent demise of RethinkDB
下一篇:Now Open – AWS US East (Ohio) Region
酷辣虫提示酷辣虫禁止发表任何与中华人民共和国法律有抵触的内容!所有内容由用户发布,并不代表酷辣虫的观点,酷辣虫无法对用户发布内容真实性提供任何的保证,请自行验证并承担风险与后果。如您有版权、违规等问题,请通过"联系我们"或"违规举报"告知我们处理。

china_lihai 发表于 2016-10-18 06:24:32
如果你活着,早晚都会死;如果你死了,你就永远活着
回复 支持 反对

使用道具 举报

*滑动验证:
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

我要投稿
扫码访问 @iTTTTT瑞翔 的微博
回页顶回复上一篇下一篇回列表手机版
手机版/CoLaBug.com ( 粤ICP备05003221号 | 文网文[2010]257号 )|网站地图 酷辣虫

© 2001-2017 Comsenz Inc. Design: Dean. DiscuzFans.

返回顶部 返回列表