All posts tagged ‘Browsers’

Microsoft Adds H.264 Video Support to Firefox

Thanks to licensing issues and exorbitant fees, Mozilla doesn’t support the H.264 video codec in Firefox, but Microsoft (yes, Microsoft) is aiming to change that.

Microsoft has created a Firefox plug-in that will tap into Windows 7′s native H.264 support, allowing Firefox 3.6 and the 4.0 betas to play H.264 encoded video.

If you’d like to give it a try, you can download a copy of the HTML5 Extension for Windows Media Player Firefox Plug-in from Microsoft’s Interoperability Labs.

The HTML5 video tag promises to eliminate the need for third-party plugins like Flash or QuickTime. Sadly, it’s a long way from “promises” to “delivers.” While HTML5 offers a video tag for authors to easily add videos to their webpages, it’s up to the browser to actually play that video. And that’s where the problem arises — what video codec should the browser use?

Apple is standing firm behind the H.264 video codec. But H.264 has licensing requirements, fees and is not free in any sense of the word. Mozilla Firefox supports Ogg Theora and WebM, both of which are open and free. Google’s Chrome supports all three codecs. Opera supports Ogg Theora and WebM. Microsoft has decided to support H.264 and WebM in IE9.

In short, varying codec support across browsers has made native HTML5 video a mess.

Microsoft’s new add-on brings support for H.264 to Firefox whether Mozilla wants it or not. The add-on parses HTML5 pages and replaces video tags with a call to the Windows Media Player plug-in. Unfortunately it’s not perfect. To deal with the different codec support in each browser, many sites use JavaScript to determine the browser’s codec support before presenting a video. If that’s the case, the new add-on won’t work because the detection code won’t see the H.264 support (the H.264 support is an add-on, not a native part of Firefox).

Ironically, native web video isn’t supported at all in Microsoft’s own browsers, regardless of the codec used (IE9 will introduce support for HTML5 video when it is released next year). Third-party developers have already created an experimental IE add-on to help current versions of IE get in on the native web video fun.

Microsoft’s add-on is far from ideal, but if you’ve been frustrated by Firefox’s lack of H.264 support, it does offer a partial solution. Hopefully, in the long run, browsers will standardize around WebM, which seems to enjoy the most widespread support (Apple’s Safari is current only browser that hasn’t pledged WebM support), but if that doesn’t happen solutions like this one may become even more common.

See Also:

File Under: Browsers, HTML5

Security Flaws Force Firefox, Opera to Turn Off WebSockets

Firefox and Opera have both disabled support for HTML5 WebSockets in the latest builds of their respective browsers. The move comes on the heels of a protocol vulnerability that could leave thousands of sites harboring malicious code.

New in HTML5, the WebSocket protocol enables a key mechanism found in modern web apps, allowing servers to independently send data to a client browser without the need for page refreshes or complex JavaScript. The most immediate use for WebSockets are apps that rely on full-duplex communication channels, like web-based chat tools and other real-time sharing apps.

Unfortunately, flaws in the WebSockets protocol also make the current spec easy to exploit.

The vulnerability was discovered by Adam Barth, who has demonstrated that a serious attack against the protocol could poison caches that sit in between the browser and the internet. That means, for example, a common JavaScript file like a Google Analytics script, could be replaced on a cache with a malware file.

As Mozilla’s Hacks Blog notes, the exploit doesn’t just affect browsers implementing WebSockets, but also Flash and Java. As the blog post says, “to avoid a lot of malware showing up without being easily traceable, we need to fix the protocol.”

Details of the exploit can be found in Barth’s paper [PDF link] and a series of messages to the Internet Engineering Task Force mailing list. Fortunately there appears to be a solution, but it will require rewriting some of the WebSockets spec.

However, until that solution is implemented both Mozilla and Opera have disabled support for WebSockets. Mozilla expects other browser to follow suit, though so far Opera is the only other browser to disable support. WebSocket support isn’t just a feature in desktop browsers either, the recent Mobile Safari upgrade in iOS 4.2 added support for WebSockets.

So far neither Adobe, which makes the Flash Player plug-in, nor Oracle, which oversees Java, have addressed the issue.

If you’ve been experimenting with WebSockets, be aware that the as of Firefox 4 Beta 8 (due in the next few days), Mozilla will no longer support your code. Neither will Opera 11. We really don’t expect this to be a long-term issue, so if you want to continue testing apps based on the nascent protocol, you can re-enable the features by changing a hidden preference in Firefox and Opera.

Photo by Andy Butkaj/Flickr/CC

See Also:

File Under: CSS

Why Percentage-Based Designs Don’t Work in Every Browser

Here’s a rule any web designer can live by: Your designs don’t need to look exactly the same in every browser, they just need to look good in every browser.

It’s a maxim that will spare you many a hair-pulling hour. That said, there some things you would expect to be the same across browsers that aren’t. One such problem that’s likely to crop up more often as designers jump on the responsive, flexible-width bandwagon is percentage-width CSS rules.

According to the spec, browsers, given a percentage width, would simply render the width of the page based on the size of the container element. And, in fact, that’s what browsers do, but how they do it varies quite a bit. As a result, percentage-based widths are often displayed quite differently across web browsers.

Developer Steffan Williams recently ran into this problem when trying to create a percentage-based version of his Gridinator CSS framework. Williams created a container <div> with a width of 940 pixels and then wanted to create a 12 column grid within that container. Do the math and you end up with columns set to a width of 6.38298 percent.

Pull that up in Firefox or Internet Explorer 6/7 and you’ll see what you expect to see. In Safari, Chrome and Opera, however, you’ll see something different. IE 8 and 9 are also slightly off.

The problem is not a new one; developer John Resig pointed this out years ago. But as Williams notes, it’s odd that browser behavior when rendering percentage-width grids is still so inconsistent across vendors, especially given how much today’s browsers tout their CSS 3 support.

The problem isn’t necessarily a simple case of Firefox and IE being right and the others wrong. As Opera CTO and CSS creator Håkon Wium Lie tells Webmonkey, the problem is “the CSS specification does not require a certain level of precision for floating point numbers.”

This means browsers are free to round your carefully computed percentages up or down as they see fit. According to Lie, Opera considers the result of Williams’ experiment to be a bug. Same with the WebKit project, the engine that handles rendering in both Safari and Chrome, though in Webkit’s case the bug has been unassigned since 2006. But really, there is no right or wrong here, just different ways of rounding.

Continue Reading “Why Percentage-Based Designs Don’t Work in Every Browser” »

File Under: Browsers

Chrome 8 Offers Built-in PDF Tools, Security Fixes

Staying on track with its rapid-fire, six week release cycle for its web browser, Google has pushed out the final version of Chrome 8. The latest release packs in some 800 bug and security fixes, as well as a new inline PDF viewer.

If you’re using the stable, everyday version of Chrome, you should be automatically updated to Chrome 8. If you’re using another release, or would just like to give Chrome a try, head over the Google Chrome download page.

The new, built-in PDF viewer means that when you click on a link to a PDF now, Chrome will no longer download the file to your PC. Instead, Chrome will offer a preview in the browser where you can view and search the document. Also, thanks to the sandboxing model, this decreases the chance of malicious code, malware or anything else bad being delivered through the PDF. Of course, if you then decide to download the file, Chrome won’t protect you from anything that might be lurking inside.

The PDF reader joins Flash in the list of things that Chrome manages for you. That means Google can push out updates and security fixes as needed to these components of its browser, rather than relying on users to update plug-ins themselves. You can disable the PDF viewer (or any other plug-in) by navigating to about:plugins inside Chrome.

Chrome 8 is also the first version capable of connecting to the Chrome Web Store. Although there’s nothing to see at the moment, Google is planning to release a store similar to the Android Marketplace or Apple’s App Store, but with a focus on web applications, Chrome extensions, and Chrome themes.

See Also:

File Under: Browsers

Opera 11 Beta Lets You Stack Your Browser Tabs

'Tab Stacking' in Opera 11 beta

Opera software has released the first beta of the upcoming Opera 11 browser.

New in Tuesday’s release is an innovative feature called “Tab Stacking,” which gives you the ability to stack and group your tabs together to better organize the pages you’re viewing.

An alpha release of Opera arrived earlier this autumn, and it gave us a taste of some other new features, like lightweight browser add-ons and some hardware acceleration features new to version 11. Those features have been refined and are included here along with the new tab tricks.

If you’d like the take the beta release for a spin head over to Opera download page.

Tab Stacking is the standout feature in this release. It is ingeniously simple and works a little bit like the way you create folders of apps on the iPhone’s home screen. You group related tabs by dragging them on top of each other. Your “stack” then collapses down into a single tab. To access the tabs in a stack, you simply mouse over the group and it expands, or you can click the arrow to the right of the grouped tab, which has the same effect.

The idea of grouping tabs is nothing new. Firefox 4 will also introduce a new interface for grouping tabs when it is finalized in a few months.

Only a slim one or two percent of the desktop browser market uses Opera daily. Still, the company is known for building innovative user interfaces into its browsers ahead of its larger, more widely-used competitors. Things like mouse gestures, or the page that shows thumbnails of your favorite sites when opening a new tab were first introduced in Opera. So it’s a change of script to see the company in the position of playing catch-up to the big names when it comes to grouping tabs and supporting lightweight add-ons.

However, Firefox 4′s current implementation (also still in beta) suddenly looks awkward and primitive next to Opera’s take on the same idea. It more elegant, and it plays on a behavior many users — those with iPhones or iPads — are already familiar with.

The best way to understand Tab Stacking is to see it in action:

Continue Reading “Opera 11 Beta Lets You Stack Your Browser Tabs” »