Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML5 feature detection #1166

Closed
robocoder opened this issue Feb 21, 2010 · 4 comments
Closed

HTML5 feature detection #1166

robocoder opened this issue Feb 21, 2010 · 4 comments
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.

Comments

@robocoder
Copy link
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
Copy link
Member

mattab commented Feb 22, 2010

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
Copy link
Contributor Author

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
Copy link
Member

mattab commented May 28, 2010

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
Copy link
Contributor Author

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

@robocoder robocoder added this to the Future releases milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Projects
None yet
Development

No branches or pull requests

2 participants