Due to some circumstances, this blog is now up for sale, for more enquires contact: Plushista@gmail.com
Pin It

Detection Techniques to Check Browser Support For HTML5 Features

by Unknown | Saturday, October 18, 2014 | 72 Comments

Any website is built with a common goal in mind: to make it work according to the latest specifications and web trends. Since the mobile Internet usage is growing with each passing day, it is becoming needful for site owners to develop a site that is optimized for mobile users. And HTML5 provides the potential to build mobile websites. This is why, HTML5 web development is becoming the most popular web trend used by webmasters around the world.

HTML5 introduced a lot of new and cool functionalities including some great semantic elements, audio and video support and the canvas tag. However, some old browsers don't provide support for HTML5, and thus you may think how to adopt HTML5 if your users don’t have HTML5-compatible browsers. But that's not what you should be thinking, as it is a misleading thought. Remember that the browsers that support HTML5 means that they support different features of it; and rather than detecting whether “browsers support HTML5”, you should detect if the new HTML5 functionality is supported in the browsers or not.

This post will help you explore how to detect browser support for the new HTML5 elements.

An Overview of the Detection Techniques

When a web page is rendered by a web browser, a Document Object Model (DOM) is created. A DOM is a collection of objects that specifies the HTML elements by a different object. Some of those elements include <p> tag, <span> tag and a few other tags. All of the DOM objects boasts a common set of properties, however certain objects may have more properties compared to others. Most importantly, browsers that support HTML5 features will contains some DOM objects having unique properties. And so, looking at the DOM will most likely help you know about the features that the browsers support.

Below is a list of four basic techniques that will help you detect whether a browser supports HTML5 feature or not.

1. Technique to identify whether a particular property exists on a “global object” such as window or navigator. For example, below is a function that helps to verify whether the browser supports geolocation or not.

function supports_geolocation() {
return !!navigator.geolocation;

2. Technique that allows users to create an element, and then test whether a certain property is governed by that element. This technique is quite useful to check for canvas support.

function supports_canvas() {
return !!document.createElement('canvas').getContext;

3. Third technique also help create an element, and verify if a certain method is characterized by that element or not. Next, call the method to find out the value it returns. For example, using this technique you can test video formats that are supported by a browser.

function supports_x123_baseline_video() {
if (!supports_video()) { return false; }
var m = document.createElement("video");
return m.canPlayType('video/mp3; codecs="avc1.42E01E, mp3a.40.2"');

4. You can use a detection technique that let you create an element, which is followed by setting a property for a certain value, and then testing whether the property has retained its value or not. For example, check out which <input> types are supported. 

var v = document.createElement("input_value");
v.setAttribute("type", "color");
return v.type !== "text";

A Look Into Modernizr – HTML5 Feature Detection Library

Modernizr JavaScript library is touted as the most viable solution for detecting support for HTML5 features. It uses the advanced JavaScript object detection techniques to check whether the current browser has implemented HTML5 and CSS3 features or not. This feature detection library makes it convenient for you to discover what can and cannot do with your current browser.

In order to use this library, you will have to incorporate the below mentioned <script> element in your page <head> section:

<!DOCTYPE html>
  <meta charset="utf-8">
  <title>Detect Browser Support for HTML5 Features</title>
  <script src="modernizr.min.js"></script>

You do not need to run Modernizr manually and there's no modernizr_init() function that you'll need to call. Rather it runs automatically and creates a global object called as “Modernizr” that uses boolean properties for each feature that it tests. For example, in case your current browser supports the “canvas API” HTML5 feature, then the Modernizr.canvas property will return true. But, if the browser doesn't support canvas API, then the Modernizr.canvas property will return false.

if (Modernizr.canvas) {
  // draw some shapes!
} else {
  // native canvas support is not available

Note: Since the Modernizr detection library version keeps on updating, make sure to use the latest one to get optimal results.

Let's Wrap Up!

HTML5 is widely used for web development today, especially it is used by business entities that want to build a functional website that help them stay competitive in today's mobile marketplace. However, a lot of users still don't use browsers that support HTML5 functionality. And thus, while developing in HTML5 it becomes imperative to test whether the browser that your users are using supports the HTML5 features or not.

Amy Brown is a web developer by profession, a writer by hobby and works for WordPrax Ltd., a WordPress development services company. She loves sharing information regarding WordPress customization tips & tricks.

Go Social:

Subscribe For Free Updates!

*Please confirm the email sent to your inbox after clicking "Sign Up!".

72 comments : Post Yours! Read Comment Policy ▼
We have Zero Tolerance to Spam. Chessy Comments and Comments with Links will be deleted immediately upon our review.

  1. This wonderful post is in fact so interesting and comic, I really loved this. Thanks intended for sharing this information.
    instagram shoutouts

  2. This comment has been removed by the author.

  3. Get All the updates about t20 wc 2016. Livescore t20 wc 2016. Match details and match predictions icc t20 wc livescore

  4. France Ligue 2 Live Stream
    Watch live football streaming online at livefootballontv1.com. Find out a complete tv guide of today's popular matches in Europe.

  5. good It is certainly incredibly simple to download video lessons to your Product. this page that users happen to be demonstrating consequently Vidmate APK Android nice.

  6. good USB line interconnection can be the simply one approach to copy data files this page Only believe about the difficulties that you get through SHAREit on Computer nice.

  7. good introduce in Snapchat, 2015 revisions and because filters on snapchat The function is usually to become acquired as great.

  8. Windows Live Hotmail or Hotmail is one of the most popular emailing service hotmail.com sign in

  9. good Now you can easily watch your favorite movies this page After accessing the showbox apk record track down ShowBox Download Free nice.

  10. This is very nice one and gives depth information. Thanks and keep posting! Thanks again for the blog article . Much thanks again. Great. hotmail sign in

  11. Great Post! Learn some new tactics today. Thanks for sharing.

  12. Well Said, you have furnished the right information that will be useful to anyone at all time. Thanks for sharing your Ideas.
    Node JS training in chennai | Node JS training institute in chennai

  13. Let’s keep are safe place to play the very best free games for kids! Please click: wingsio | slither io | abc

  14. You can receive or send emails to friends and colleagues as well as easy access to the application the Microsoft website. Let's create a separate account for her right now.
    hotmail login | create new hotmail account
    Creating a Gmail account is quick and easy. You can follow the tutorial to sign up Gmail here
    gmail login | google drive login

  15. IOS 10 is the tenth major release of the iOS operating system developed by Apple Inc. to use it without any restriction imposed by Apple Inc.You can download iOS 10 Jailbreak. from CydiaNerd.

  16. good Download Google Duo for Apple pc Computer here Google Duo for iOS but also sometimes it can come to be a aggravating nice.

  17. اهم شركات كشف تسربات المياه بالدمام كذلك معرض اهم شركة مكافحة حشرات بالدمام والخبر والجبيل والخبر والاحساء والقطيف كذكل شركة تنظيف خزانات بجدة وتنظيف بجدة ومكافحة الحشرات بالخبر وكشف تسربات المياه بالجبيل والقطيف والخبر والدمام
    شركة تنظيف خزانات بجدة
    شركة مكافحة حشرات بالدمام
    شركة كشف تسربات المياه بالدمام

  18. اهم شركات نقل العفش والاثاث بالدمام والخبر والجبيل اولقطيف والاحساء والرياض وجدة ومكة المدينة المنورة والخرج والطائف وخميس مشيط وبجدة افضل شركة نقل عفش بجدة نعرضها مجموعة الفا لنقل العفش بمكة والخرج والقصيم والطائف وتبوك وخميس مشيط ونجران وجيزان وبريدة والمدينة المنورة وينبع افضل شركات نقل الاثاث بالجبيل والطائف وخميس مشيط وبريدة وعنيزو وابها ونجران المدينة وينبع تبوك والقصيم الخرج حفر الباطن والظهران
    شركة نقل عفش بالرياض
    شركة نقل عفش بالطائف
    شركة نقل عفش بالدمام
    شركة نقل عفش بجدة
    شركة نقل عفش بمكة
    شركة نقل عفش بالمدينة المنورة
    شركة نقل عفش بينبع
    شركة نقل عفش بالخرج
    شركة نقل عفش بالقصيم

  19. Such a very useful article. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article.

    Discover our website bounty of free online games now!
    Our website has the biggest collection of free online games. Totally new games are added every day!

    age of war 2| gold Miner 2| unfair Mario 2 | cubefield 2 |tanki Online 2

  20. good Follow the on display directions to complete the procedure. Nox App Player Nox Application Gamer works with all OS versions. nice.

  21. good than main Slack client for Linux. I had an issue with the slack windows to the Windows Store or a Windows Phone application in the future nice.

  22. awesome you are picking is extremely lightweight which will certainly Best Crib Mattress Reviews If it is a firm cushion it ought to not fix to the shape of your hand, instead nice.

  23. good consistently maintains seeking any type of video imobdroapp.com which individuals are going to love without a doubt nice.

  24. good all the individuals. Minor insects have actually been dealt with. Mobdro for XBMC to download Mobdro Application for apple iphone nice.

  25. Great fascinating to consume time Mobile video https://imobdroapp.com certainly get all the functions of a premium TELEVISION application free Fine.


  26. The blog or and best that is extremely useful to keep I can share the ideas
    of the future as this is really what I was looking for, I am very comfortable and pleased to come here. Thank you very much.
    tanki online | 2048 game |
    tanki online game


  27. The share your really gives us excitement. Thanks for your sharing. If you feel tired at work or study try to participate in our games to bring the most exciting feeling. Thank you!
    hotmail sign in | red ball game |

  28. The blog or and best that is extremely useful to keep I can share the ideas of the future as this is really what I was looking for, I am very comfortable and pleased to come here. Thank you very much.
    animal jam | five nights at freddy's | hotmail login


  29. The share your really gives us excitement. Thanks for your sharing. If you feel tired at work or study try to participate in our games to bring the most exciting feeling. Thank you!
    hotmail login | red ball game |

  30. Very good article. I certainly love this site.

  31. Looking for some addicting Korean TV shows to watch? ... For example, variety shows tend to use simple, conversational language, while dramas can cover a ...Feb 27, 2017 - Several hit South Korean variety shows have been removed from major streaming platforms in China over the past two days.Best Korean Variety Shows interactive top ten list at TheTopTens ®. Vote, add to, or comment on the Best Korean Variety Shows.Read FACT #9 || What Korean Variety shows & K- Dramas I've watched || from the story ~ All about Meh~ by PinkPrincessJinOppa (ʕ•ᴥ•ʔ Cutie ʕ•ᴥ•ʔ) with 43 ...Dailymotion United States - Playlist Korean Variety Shows.Find and follow posts tagged korean variety show on Tumblr.Translate Korean variety shows. See Spanish-English translations with audio pronunciations, examples, and word-by-word explanations.

  32. Your thought and explaining power is too good. Really its very impressive. I am waiting for another one. Manvi Kakkar Mumbai’s high profile model. Get more information from my sites.
    Mumbai Escorts
    Mumbai Call Girls
    Independent Mumbai Escorts
    Female Mumbai Escorts
    Mumbai Escorts Services

  33. Thank you for sharing this article with us!
    slither io

  34. Also utilize various other options for Bluestacks like mobdro apk shows, movies, tunes and also far more on larger screen.

  35. Thank you for sharing! The problem seems simple, but through your pen, it impresses me!

  36. Below we share the guide to download and mount this Apk on your Mini Militia Co-op and also Survival settings. Fire a multitude of weapon.

  37. Your topic is very nice and helpful to us ... Thank you for the information you wrote.
    usps tracking

  38. Thank you so much for ding the impressive job here, everyone will surely like your post.
    I really enjoy reading and also appreciate your work.
    jailbreak iOS 10.3
    cydia sources

  39. Thanks for sharing these useful information! This is really interesting information for me.
    - learn color 4kids

  40. Nice post http://www.selfcarinsurance.com

  41. I enjoyed on reading your blog post. Your blog has a lot of useful information for me, I got good ideas from this great blog.

  42. you could maintain Tutu helper on the side for your additional app demands. click here the APK documents. Inspect APK and Download folders.

  43. Nice And Informative Website. Please Keep Continue Such Kind Of Effort. I Shared Your Post With My Friends Also. Are You Looking For Independent Escort Service In Mumbai? We Deal In High Class Mumbai Models And Beautiful mumbai call girls. We Are Available To Serve You 24 X 7. Contact Us For Booking Ph- 09987215552

  44. Independent Escort Service In Mumbai, Call - +91- 9004009481
    Hi friends are you looking the best escort service in Mumbai? Contact me, my name is Ritu Sharma. I am an independent Mumbai escort girl. I provide the best service in low cost. I am compostable to move at your own place like your room, hotel etc. I am glad to tell you I am available 24 X 7 for you. My personal no- +91- 9004009481
    I am fully professional escort girl. I am trained completely in my profession. I understand you personal feeling and needs. Once you take my service you call me again. Apart me in my profession I have some beautiful Mumbai models also in low price. You can take enjoy with me short time, and long time. Just you need to call me at my personal number to book my VIP services.
    Reach To A Safe Juncture With The Escort Service In Mumbai
    Have you become bore with your life? Is there no enjoyment and fun? There is one solution with me. Do you know what? The escort service in Mumbai is the one. You can find very pretty girls in the website. Are you a resident of Mumbai? Or do you come Mumbai often for official purpose? You can always find these escorts. Just a phone call and she will be ready to serve you. But they are in a high demand. You need to make your booking in an advance. But, we have wide collection of escorts. Choosing from that list is possible too. Are you eager to see them? The website can give you a vivid view. Also, you can visit the agency of escort service in Mumbai. All of them will be present there.
    Perfect Companion With Escort Service In Mumbai
    We, human being are social beings. We cannot stay alone. A partner is always required. For every male, a female partner is needed. Life become meaningless without such companion. You can now take the Mumbai escorts here and there while you are out. The escort service in Mumbai has great flexibility. Some of the escort agency will allow the time flexibility as well. There is special rate for each escort. Some girls are extremely demanded by clients. Thus, their rate is high. If you want to get the best one of the lot, its is the time to hurry up.
    Escort Service In Mumbai- English Speaking
    Can you imagine, even escorts can speak in English? Proper training is given to all of them at the very early stage. Some of the escorts already know English language right from the time they were recruited. But, some of them were not aware of this language. Thus, special training is provided to them. The spoken English is taught o them so that they can speak with all types of clients. Thus, they can entertain the international clients. Sometimes, there are business clients who have come from other parts of the world. How do they get entertained? escort service in Mumbai will be the remedy.

  45. Nice Blog I Like
    Amazing Dwarka Escorts Dipti: +91-9999965857 have a collection of independent Dwarka escort,Dwarka call girls in Delhi peaceful loving stunning.
    Saket Escorts
    Rk Puram escorts
    Call Girls Nehru Place
    Call Girls in Noida
    Kashmiri Gate escorts
    laxmi nagar escorts
    Indirapuram Escorts
    Connaught Place Escorts

  46. Welcome to our Chennai Escorts Agency Administrations home page where you can get all the conceivable subtleties and answers to every single inquiry of yours. These Chennai Escorts including Chennai model escorts and Russian model Escorts in Chennai are constantly amusement for anything. If you visit this site, at that point you will be very shocked to have found a distinctive scope of Free Chennai Escorts They are just hypnotizing in whatever they do and will insightfully execute their activity of temptation so as to make their customer's wants run wild. They embrace every single customer calls with equivalent earnestness and accuracy so our Autonomous Independent Escorts in Chennai organization never loses its appeal and notoriety which has dependably been an indication of magnificence and accomplishment for us.

    Chennai Escort
    Chennai Escorts Agency
    Russian Escorts in Chennai
    Escorts Service in Chennai
    Call Girls in Chennai
    Chennai Escort Service
    Independent Chennai Escorts
    Pune Escort
    Pune Escorts Agency
    Elite Escoers in Pune
    Independent Escorts in Pune
    Escorts Service in Pune
    Call Girls in Pune
    Pune Escort Service
    Independent Pune Escorts

  47. We are a high-class escort call young lady master affiliation Call Girls in Ahmedabad where you can discover most amazing mates here for profiting however much as could reasonably be expected from your loosening up time cheerfully. We recognize that you are here in light of how you are examining for a to an incredible degree great and befuddling Call Girls in Ahmedabad. Congrats, you are in a perfect spot! You will discover all that you require here. On the off chance that you are checking for an escort advantage with a capability.
    Ahmedabad Escorts
    Ahmedabad Escorts Service
    Escorts in Ahmedabad
    Ahmedabad Escort Service
    Escorts Service Ahmedabad
    Independent Ahmedabad Escorts
    Ahmedabad Escort Agency
    Ahmedabad Escort
    Kolkata Escorts
    Call Girls in Ahmedabad


  48. Our escorts have all set to give you a remarkable encounter of mind-blowing intercourse. Prepare to feel a mating session through the profundity of your heart. Our escorts have skill into gratifying your intimate desire by bringing different mating styles into play for you. Here is an intimation regarding their excellent highlights. Enthusiastic Kolkata Call girls will never get over you from demanding any of following services.

    Kolkata Escorts
    Independent Escorts in Kolkata
    Russian Escorts in Kolkata
    Kolkata Escort Agency
    Kolkata Escort
    Escorts Service in Kolkata
    Call Girls in Kolkata
    Chennai Escort Service
    Independent Chennai Escorts
    Ahmedabad Escorts


Recent Posts

Let's Connect

Site Links

Copyright © 2014 RealcomBiz. All Rights Reserved.
Powered by Blogger