views:

22

answers:

1

I'm interested in writing a log file analyzer that can determine the percentage of users who have HTML5-Canvas support based on the user agent strings in the logs. However, having scoured some of the literature out there on the subject, it's not obvious to me what I should be looking for in the user-agent string.

One simple option would just be to build a dictionary of all browsers which support HTML5-Canvas - do you know if such a table exists? If not, where would you start then?

+2  A: 

I would not rely on the user agent string. I'd rather test the feature itsselfe.

As for canvas:

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