HTML and CSS Reference
In-Depth Information
Fallback solutions
In real life, physical contact is preferred, as it is more direct and efficient, but it
shouldn't be the only way of meeting someone. There are numerous cases where you
won't be able to handshake, so you'll need to find other methods of communication.
The sad reality of HTML5 is that every browser does not equally support it. Especially
considering the new JavaScript APIs, major or minor differences still exist among dif-
ferent browsers. However, even if the browser vendors decided to provide the exact
same features for their current releases, there would still be people who cannot or do
not want to update. According to StatCounter and W3Counter, as of March 2013, the
lion's share of desktop browsing belongs to Google Chrome, followed by Microsoft In-
ternet Explorer and Mozilla Firefox.
Internet Explorer 8 still shares 7 percent, Internet Explorer 7 shares 5 percent, and
Safari 5.1 shares 3 percent. A total of 15 percent is translated to a number of custom-
ers you probably do not want to miss.
Here come the fallback solutions, which can handle such situations and provide a
gracefully scaled-down experience to the users of older browsers. There are two
kinds of popular fallbacks nowadays, Plugins (such as Flash or Silverlight) and
JavaScript hacks , formally known as polyfills .
JavaScript polyfills
We start by examining polyfills, as they are more close to the native web. JavaScript
polyfills are solutions and libraries that mimic a future feature, by providing support
for older browsers. Currently, there are polyfill solutions for almost all HTML5-specific
feature ( canvas , storage , geolocation , WebSockets , CSS3 , and so on).
If you need to implement both an HTML5 and a polyfill solution, why not just imple-
ment the second one and save time and money? Well, here are four reasons you
should use both:
Search WWH ::

Custom Search