HTML and CSS Reference
In-Depth Information
There is an endless variety of computing platforms, operating systems, and browsers available on the market.
Every manufacturer and developer tries to provide additional features; thus, products are constantly competing
with each other. This diversity results in different operations and functionalities. The functionality and behavior
of web sites across the different systems are not guaranteed by default but can be achieved by implementing
widestream standardized solutions. Naturally, users want to use various systems together that allow truly efficient
communication. Data access would be restricted without standards, and platform-dependent solutions would rule
the market.
Web interoperability ensures that standard-compliant web pages can be viewed in any browser under any
operating system, from Windows to Mac OS and Linux, and not only on desktop computers but also on mobile
devices, including tablets and smartphones.
Several technologies support interoperability and should be used in web development, including, but not limited
to, UTF-8 character encoding, XML documents, structural and semantic markup with XHTML or HTML5 [108],
DOM scripting, ECMAScript, CSS-based layout, separated structure, presentation and behavior, equations described
in MathML, and semantic metadata.
Browser Independence
“One page, many views” has always been a nightmare for web developers. Although it is a natural user expectation for
all web sites to look and behave the same way in various browsers, it is far from straightforward to fulfill.
Anyone who slaps a “this page is best viewed with Browser X” label on a Web page appears to
be yearning for the bad old days, before the Web, when you had very little chance of reading a
document written on another computer, another word processor, or another network.
—Tim Berners-Lee [109]
While there is a variety of web browsers on the market, the majority uses only a few browsers, namely,
Internet Explorer, Mozilla Firefox, Google Chrome,Safari, and for a lesser extent, Opera. Focusing on these flagships
is usually sufficient, especially when the major rendering engines behind these browsers—Trident, Gecko, WebKit,
and Blink—are the ones that power the most popular mobile browsers too (Trident is used on Windows Phone
smartphones, Firefox for mobile (Fennec) running on Android phones use Gecko, while iPhones and iPads use
Webkit). Statistics show that only very few visitors use browsers powered by other rendering engines.
No one wants to drive potential customers away, so it is very important to avoid browser-specific coding. The
best approach is to create sites that are best viewed with any browser which can be indicated clearly by the logo of the
“Viewable with any browser” campaign [110].
To create very similar (more or less identical) appearance in all major browsers, various tricks have been applied
for years to ensure functionality. However, browser-targeted code blocks do not work satisfactorily under all browsers,
so more and more different hacks were added to support different browsers (and older browser versions), resulting
in a mass of incorrect code. The right approach is to create standard-based web sites. Even if some standards are
not fully supported in some browsers (which is actually a headache for web designers), standard-compliant codes
are at least ready for the future [111], and can serve as excellent starting points for best practices and web standards
A very bad practice associated with the problem of the different rendering behavior of browsers is code forking .
Code forking is the development of multiple versions of the same content for various browsers. Code forking should
not be applied because the resulting code cannot be used in the long term.
Web standardistas agree that web sites cannot be expected to look exactly the same way in every browser, but
the information published on web pages should be legible and the functionalities should be available in all major
browsers [112, 113].
Search WWH ::

Custom Search