开发者

Code to detect mobile browser support for HTML5

开发者 https://www.devze.com 2023-02-20 00:18 出处:网络
I want the c开发者_运维百科ode (C# / JavaScript) to detect which mobile browsers are support HTML5. I have the code to detect the HTML5(canvas) compatibility for desktop browsers. But this code is not

I want the c开发者_运维百科ode (C# / JavaScript) to detect which mobile browsers are support HTML5. I have the code to detect the HTML5(canvas) compatibility for desktop browsers. But this code is not working for mobile browsers.

if (!!document.createElement('canvas').getContext) {
  this browser supports HTML5(canvas)
} else {
    not supports HTML5...
}


You could also use the famous Modernizr.


Use this library http://51degrees.mobi/ it will return you a list of browser capabilities based upon the client and is based from an updated database. We use at work and it's awesome

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号