HTML and CSS Reference
In-Depth Information
1. Better user experience: When using HTML5, you serve your visitors the best
and smoothest experience possible. Everything is handled by the browser,
and you only need to focus on your application's requirements. When using
a polyfill to address a specific issue, the end-product cannot be of the same
quality. Surely, delivering something is better than delivering nothing, but a
polyfill is just a patch for those who run poorer vehicles.
2. Performance: The most significant advantage between a native HTML5 solu-
tion and a polyfill plugin, is performance. When you request a JavaScript
file, you require extra resources, which increase loading time. Moreover, a
JavaScript plugin runs way slower than a native browser-implemented meth-
od. Regarding WebSockets, the protocol is designed to provide bidirectional
full-duplex communication. That is the fastest way you can achieve this kind
of staff. What a polyfill can do is to simply mimic full-duplex communication,
using traditional AJAX polling . We have already seen that AJAX polling is
way slower than WebSockets.
3. Future-friendly: Using HTML5 right now lets your website or app to be auto-
matically enhanced from any future browser update. For example, someone
whousedcanvasthree yearsago, benefitted automatically when Internet Ex-
plorer was updated to Version 9.
4. Standards-friendly: Although content, not web standards, should be our top
priority, it is good to know that our current implementation consorts with
the formal technical specifications. Moreover, the web standards propose
what is known as "best practices". Although polyfills usually consist of valid
JavaScript code, most of the time they need to address browser-specific
bugs and inconsistencies by inserting necessary non-standard code.
Popular polyfills
Modernizr , a well-known library for detecting HTML5 and CSS3 features, provides
a great list of HTML5 polyfills that can make your life much easier when it comes to
supporting older browsers. Regardless of which HTML5 feature you are using, there
is a corresponding polyfill available at
Regarding WebSockets, following are a some of the libraries that mimic the We-
bSocket behavior:
Search WWH ::

Custom Search