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.
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.
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.
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.
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.
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
Safari, for instance, will sometimes miss finger taps on the text in the
<body> tag (151933). Sometimes the
<select> menus don’t work on the iPad because the browser has shifted the rectangle for looking for input (150079). Sometimes the clicks trigger a weird wiggle in the item -- which might even look like it was done on purpose by an edgy designer (158276). All of these lead to confusion when the text or images on the screen don’t react the way we expect.
The plan has always been to simplify the delivery of audio and video by moving the responsibility inside the browser and out of the world of plugins. This has eliminated interface issues, but it hasn’t removed all the problems. The list of video bugs is long, and many of them are all too visible. Bugzilla entry 754753 describes “mostly red and green splotches that contain various ghost images,” and Bugzilla entry 1302991 “’stutters’ for lack of a better word.”
Some of the most complex issues are emerging as the browsers integrate the various encryption mechanisms designed to prevent piracy. Bug 1304899 suggests that Firefox isn’t automatically downloading the right encryption mechanism (EME) from Adobe. Is it Firefox’s fault? Adobe’s? Or maybe a weird proxy?
Video bugs are going to continue to dominate. Integrating web video with other forms of content by adding video tags to HTML5 has opened up many new possibilities for designers, but each new possibility means new opportunities for bugs and inconsistencies to appear.
The ability for the web page to follow the mouse moving across the page helps web designers give users hints about what features might be hidden behind an image or word. Alas, hovering events don’t always make their way up the chain as quickly as they could.
The new Microsoft Edge browser, for instance, doesn’t hide the cursor when the mouse is hovering over some
<select> 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.
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
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.
- HTML5 shoot-out: How Chrome, Safari, Firefox, IE, and Opera measure up
- Review: 13 primo Python web frameworks
- The power of lazy programming
- Download: Developer career development guide
- 7 bad programming ideas that work
- 9 bad programming habits we secretly love
- 21 hot programming trends -- and 21 going cold