@robocoder opened this Issue on February 21st 2010 Contributor

Use cases:

  • new Piwik plugin that reports on browser capabilities wrt HTML5; e.g., number of visitors with browsers that support video, canvas, etc
  • with the foreseeable demise of Google Gears, we could add an HTML5 detection; of course, HTML5 isn't a browser plugin...

This feature would only be available if piwik.js finds the Modernizr (http://www.modernizr.com/ ) library has been loaded.

@mattab commented on February 22nd 2010 Member

Could we add change "Plugins" to "Browser features" and add HTML5 and other things in this bucket?

Could we get the html5 detection code from Modernizr and have it included in piwik.js directly?) - requiring another library is not practical (maintenance, more complicated setup, etc.)

@robocoder commented on February 22nd 2010 Contributor

Some of the HTML5 detection features requires adding elements to the DOM. Plus, the minified code is about 8K. This would double the size of minified piwik.js.

Not all browsers support all the features of HTML5. How do we count partial support?

The alternative is to identify HTML5-compliant browsers by user agent (e.g., minimum AppleWebKit/Gecko/MSIE version).

@mattab commented on May 28th 2010 Member

see http://diveintohtml5.org/detect.html#video-formats for some code to detect HTML5 features.

I don't think we can detect 'HTML5', but we could detect specific HTML5 features, I think this would make sense and add value to Piwik.

You may well ask: How can I start using HTML5  if older browsers dont support it? But the question itself is misleading. HTML5 is not one big thing; it is a collection of individual features. So you cant detect HTML5 support, because that doesnt make any sense. But you can detect support for individual features, like canvas, video, or geolocation.
@robocoder commented on January 6th 2012 Contributor

Users interested in a specific html5 feature can use modernizer and a custom variable.

This Issue was closed on January 6th 2012
Powered by GitHub Issue Mirror