jump Index ScientificPsychic.com
Scientific Psychic
2012-03-04
 

Standards compliance vs. cross-browser functionality

Webmaster's Dilemma.

The World Wide Web Consortium (W3C) provides defines for coding HTML and provides a validator to check the markup of HTML and other types of Web documents (http://validator.w3.org/). The advantage of complying with the W3C standards and having error-free code is that the web page will have cross-browser compatibility, facilitate analysis of the web pages by search engines, and ultimately enhance search engine ranking.

Standards are moving targets, and web browsers face tough competition. In the past, Netscape and Internet Explorer battled for supremacy to act as the gateways of the Internet. Each of the browsers introduced unique features that gave them an advantage over their competitor, but this created chaos for web programmers who had to provide alternative code for the browsers and their different versions.

As the number of browser competitors increased, customized browser coding lost favor and there was a clamor for HTML standards. The battle was only partially won, because the browser developers still had to support old HTML coding conventions while trying to meet the majority of the new standards. Today, five browsers dominate access to the internet: Internet Explorer (IE) from Microsoft, Safari from Apple, Chrome from Google, FireFox (FF) and Opera. Both FireFox and Opera obtain revenue from Google by setting it as the default search engine.

Most of the browsers update themselves automatically when newer versions become available. Microsoft originally tightly bundled the IE browser with its ubiquitous operating system in order to get marketplace dominance, but this turned out to be a bad decision because the newer versions of the browser cannot be installed in the older operating systems. Windows XP is locked into using version 8 of IE because the browser is used to apply updates to the operating system. Consequently, versions 6 through 9 of IE are still out in the field, and the browser has lost significant usage share. IE usage was over 70 percent in 2005, but it has dropped to about 20 percent in 2012.

The HTML5 standards, which are still under development, have the potential to standardize web applications of the future. In the meantime, web developers still have to code using some of the old conventions to get the required cross-browser functionality. A case in point is the HTML5 error message for the following applet element: "The applet element is obsolete. Use the object element instead."

<applet code="AudioBox.class" height="0" name="AudioBox" width="0">
<param name="ab0" value="laugh.au#bark.au#meow.au#"/>
</applet>

The correct HTML5 code should be:

<object type="application/x-java-applet" height="0" width="0" name="AudioBox">
<param name="code" value="AudioBox.class" />
<param name="ab0" value="laugh.au#bark.au#meow.au#"/>
Applet failed to run. No Java plug-in was found.
</object>

Unfortunately, the object element for AudioBox.class works for FF, IE version 9, and Opera, but not for Safari or Chrome, whereas the applet element works on all five browsers. Other applets work fine when converted to the object element on the Safari and Chrome browsers, but not this particular one. There must be some subtle point of incompatibility. Hence the dilemma: 1) comply with the standards and lose support for two browsers which have a combined usage share of about 40 percent, or 2) disregard the standards in favor of code that works in the five major browsers. From a business perspective, the decision to disregard standards and support the majority of customers is easy. Perhaps later, when the specification of the HTML5 is finalized and all the major browsers are compliant, there will be a time when it will be possible to meet standards and support all users.

The convergence to HTML5 will eventually reduce web site maintenance, but the diversification of web-enabled devices, such as smart phones and tablets, is already making it harder for webmasters to serve all users with common code. The small screens of the phones require customized display formats to be useful, and these web pages are usually kept in a separate mobile subdomain and have completely different code.


© Copyright  - Antonio Zamora