Icemanind
Icemanind

Reputation: 48686

Determining HTML5 compatibility

Is there ASP.NET Razor code that I can use to determine if someone is browsing my site using an HTML5 compatible browser? Or if not Razor, maybe JavaScript or even server side C# code?

Upvotes: 0

Views: 1080

Answers (2)

Sean McMillan
Sean McMillan

Reputation: 10093

There is no such thing as an "HTML5 Compatible Browser." HTML5 consists of a lot of features, most of which have a (Javascript) way to detect that they are available and working.

Modernizr is a useful tool to help you determine which features are available. There are others out there, and it's not hard to roll your own for specific features.

Upvotes: 1

Mihai Popescu
Mihai Popescu

Reputation: 115

you could try HttpBrowserCapabilities it offers some informations about the browser, not sure if it offers the version oh HTML supported... but you could give it a try...

or you can store in DB compatible browsers and check every time...

Upvotes: 0

Related Questions