Now HTML5 seems to be becoming more popular. In order to consider compatibility, some front-end experts will add codes to the web pages to judge the client browser, and know whether the user's browser supports HTML5. Here are two ways I want to use it myself.
Method 1,
<script> function checkhHtml5() { if (typeof(Worker) !== "undefined") { alert("Support HTML5"); } else { alert("Don't support HTML5"); } } </script>Method 2,
<canvas id="Canvas" ></canvas><script> if (!document.getElementById("Canvas").getContext) { alert("html5 not supported); } else{ alert("html5"); } </script>Method 3:
<script>window.onload = function() { if (!window.applicationCache) { alert("Your browser does not support HTML5!"); }}</script>If there is a better way, please contact me! Thanks