Just Browsing
Although less common now than it used to be, I frequently see people run into problems when a web browser does not work well with a particular website. Most people assume the browser is at fault if the website works without problems in other browsers. It seems like good reasoning, but it’s often far from the truth. In this article, I’ll explain why these problems exist, what web developers are doing, and how standards compliance helps.
The Problem. Since the early 1990s, there have been many browsers to choose from. Because of the web’s rapid growth, there was high demand for browsers to add new features, to make it easier to write web pages, and even to allow mistakes. So browsers like Navigator and Internet Explorer added support for non-standard and improperly-used web page elements[1]. This led many to develop websites which worked well in only one browser, and it was very common to see “best viewed with browser X” on a web page.
The situation has improved since then, and Internet Explorer is now the only major browser with poor standards compliance[2]. The other major browsers, Mozilla Firefox, Opera, Google Chrome, and Apple’s Safari, do a much better job adhering to standards. In particular, Firefox now has between 20 and 30% market share[3][4][5] – which means web developers can no longer afford to build websites which work only in Internet Explorer.
Web Development. This conflict among major web browsers has made it difficult to create websites which work properly in all browsers. Many people developing websites for themselves simply do not have the time to test their site in other browsers. Additionally, as the web grows and the official standards become more complex, it’s harder for browsers to support new standards while maintaining backward compatibility with existing web pages.[6]
So every major browser has exceptions in which it doesn’t follow the standard – known as “quirks.” And now that standards compliance has become more important, browsers generally have two ways of interpreting and displaying a web page – “standards mode” and “quirks mode.”[7][8][9][10] When a web page specifies compliance with a newer standard, browsers generally use standards mode. When a page doesn’t specify a standard or when an older standard is used, browsers generally use quirks mode.[11] However, even in standards mode, a browser may still have some quirks.[12]
So what do web developers do now? A good website written today will specify compliance with a newer standard and implement browser-specific fixes for whatever quirks or bugs affect the site. Additionally, a good site’s code will be valid according to the standard it specified. The most common cause of website display issues is poorly written code.
Standards Compliance. The Word Wide Web Consortium (W3C) is an organization which publishes official standards for web pages – which they call “recommendations.” Once a standard has been published, web browsers can begin to implement support for it. And once that happens, web developers can write websites which make use of the new functionality. The greatest benefit of having a standards compliant website is compatibility with every browser which supports the standard. Of course some browser-specific fixes may still be needed, but it usually takes relatively little effort to support other compliant browsers.
Something else that standards compliance creates is a guarantee that the website was developed properly. Many older, problematic techniques can still be used today even though their use is highly discouraged. If a website is compliant, you at least have some assurance that the website was well-written. And in some cases, visitors like to see compliance icons, and many websites publicly display the standard they comply with.
One of the tools you can use to test a website’s compliance is the W3C Validator. It can parse a web page and highlight any non-compliant elements. All you need to do is provide the URL of the page you want to check. While this tool can be useful, it’s worth noting that websites with frequent updates or dynamic content do have a harder time maintaining compliance.