2

Is there any module out there that could be used by my Django site to tell whether the client browser supports HTML5 and what features are supported?

4
  • why not use ajax and modernizer to report back once the page has loaded? Commented Aug 1, 2012 at 22:54
  • @TimmyO'Mahony - I am, indeed, using modernizr. But what I need here is a way to detect HTML5 support prior to the generation of HTML response Commented Aug 1, 2012 at 22:56
  • 1
    Does it have to be the first response? You could keep track of their moderinzer settings in the session once they've loaded a page. Otherwise it's going to guess work: you'll have to use User Agent's etc. which isn't reliable at all (it's similar to the problem of trying to guess what resolution the user has for serving up mobile/tablet pages) Commented Aug 1, 2012 at 23:09
  • @TimmyO'Mahony - I guess that's the best I can do for now. Thanks. Commented Aug 1, 2012 at 23:17

1 Answer 1

3

Sadly no. This is something that you'll need JavaScript client to do. Especially something like http://modernizr.com/

One way to do it would be to run modernizr and send results to back end.

If you would be really optimistic, you could build a list of User-Agents and decide upon that. But good luck with keeping which things works in which version of Chrome and Firefox.

Sign up to request clarification or add additional context in comments.

1 Comment

if 'ie' in user_agent.lower(): return false;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.