Microsoft agree that browser hacks lead to long term problems
In a post on their website, Microsoft have finally agreed that browser "hacks" - traditionally used by frustrated web developers to circumvent display bugs in Microsoft's Internet Explorer web browser - can lead to long term problems, noting that fixes in the upcoming IE7 can break these hacks. This means that with the release of the keenly awaited new version of Internet Explorer, currently the world's most prolific browser due to it's shipment with the Microsoft Windows operating system, that a lot of sites written using these common methods could break.
Due to bugs and display differences between Internet Explorer and other common web browsers, a large portion of the web development community have turned to "hacks" whereby you craft stylesheet code to contain a compensated value for IE, followed by the real value encoded in a way that IE can't understand due to other bugs. Microsoft say that they have fixed some of these latter bugs, but if they don't fix the issue that the hack was designed to avoid then the page won't function correctly. Microsoft admit "We’re starting to see the first round of sites and pages breaking due to the CSS fixes we have made." Although feasibly they may fix some of the display issues that developers were trying to hack around before the final release, some of the issues aren't classified by Microsoft as bugs due to ambiguity in the HTML specification. These still lead to display issues and are unlikely to be fixed any time soon.
At MicroAngelo we have never advocated the use of browser hacks as a solution to the problem of cross-browser compatibility: in fact we believe that if it can't be done relatively safely in a cross-browser way then it shouldn't be done. However, the technique has been widespread for years, and despite Microsoft's latest plea to stop using the flawed methods it is likely that even the majority of new sites will use this method. It is a real issue: with the release of the new version of IE, sites using these methods will break. The lucky ones will just look a bit weird in IE, but some will be unusable as all the text becomes unreadable.
Microsoft ask that instead of using hacks developers use "Browser Sniffing" techniques to apply specific code to each browser. While we at MicroAngelo agree that this is a better solution than using hacks, we still believe that by using better coding techniques even this time consuming step can be avoided. With smarter coding practices we can write once and use everywhere, even today, with only insignificant differences between browsers. As time goes on and browsers improve with regard to how they implement web standards, these differences will get less and less.
IE7 is predicted to ship with Microsoft Windows Vista - the next version of Windows - which means that it will likely become the most prolific browser in the world about a year later as people buy new computers or upgrade to the latest Microsoft operating system (based upon what happened with the last couple of Windows releases). This means that if your site is broken in the new browser then the problem will actually get worse over time, the opposite of the normal situation whereby old and buggy browsers slowly disappear from common use.
If you have a web site constructed in the past few years, it could be at risk. Ironically, these techniques were mostly used by those who were actually interested in using web standards for greater accessibility and usability. We will happily let you know if your site uses these methods. If it does, Microsoft recommend "that you please update your pages to not use CSS hacks." Contact us and let our expert code smiths look over your site for you.24th January 2006