Categories
Mozilla Web Development

Rebreaking The Web

It’s happening again. Once upon a time, browser vendors started adding their own features without consulting with each other and agreeing upon standards. What they created was a giant mess of inconsistencies across browsers and platforms that is still in effect today. Ask any web developer and they can tell you of the pains that they have suffered trying to make seemingly trivial things work everywhere consistently. It’s no easy task. Before IE 7, even an ajax required something along the lines of:

var httpRequest;
if (window.XMLHttpRequest) { // Mozilla, Safari, …
    httpRequest = new XMLHttpRequest();
} else if (window.ActiveXObject) { // IE
    httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
}

That’s right, IE 6 didn’t support the native xmlHttpRequest object (more here). This is just one of many examples in JavaScript and CSS. document.all anyone?

The end result of this problem became to be known as the “Web Standards” movement. Simply put it’s an idea that code should follow a standard that results in consistent output across all browsers on various platforms. Write once, run anywhere. While it’s taken years for this to manifest, it’s slowly become a reality. Firefox, Safari, Opera have fairly consistent rendering (at least in comparison to the mess of just a few years ago on the browser scene. IE 6 was fairly poor in terms of modern web development, but IE 7 made progress, and IE 8 is Microsoft’s greatest effort to date to bring their browser up to speed.

Categories
Mozilla

APNG Support On Trunk

In my habit of checking recent checkins to the trunk, I noticed support for APNG has landed [Bug 257197]. Because it’s based on PNG, APNG can use partial transparency, which can help reduce those jagged looking edges. From what I can tell, for older clients that don’t support APNG it should just show the first frame for backwards compatibility.

Awesome. Looks like the relevant KHTML bug is 88352. I don’t know if that would apply to Safari or not. I can’t find any position from Microsoft regarding support for IE. I hope their support for PNG alpha transparency (prior to IE 7) isn’t any indicator.

Regardless of adoption by browser vendors, it’s still a win for Mozilla, since chrome in the browser and extensions will be able to use APNG rather than GIF or JavaScript and PNG for animations. There is already talk of that.

You can find more on Stuart Parmenter’s blog.

Great stuff for anyone who finds animated GIF’s a bit antique.