views:

406

answers:

1

I'm trying to find a (preferably open source) JS library to determine as much information as possible about the user's Web browser environment. I know it's possible to get such data as:

  • Screen resolution,
  • User-Agent, Accept-Language and other preferences usually sent in HTTP headers,
  • Installed plug-ins (through navigator.plugins),
  • Whether a particular browser feature is supported (SVG support, DOM capabilities)

What I'm looking for is a library which gathers such information and makes it available under a common cross-browser interface (there are a bunch of incompatibilties in how browsers report installed plugins, for example). I found Modernizr which can detect HTML5-related functionality, but similar projects which report more generic information, such as the data listed above, would be more useful.

+2  A: 

I maintain Common Feature Tests project, but it is merely a set of feature tests online, not a library. Feel free to use any of them on your page.

Sometimes I also use this simple test page for testing unknown environments (all tests there are really trivial one liners).

kangax
Thanks, your tests (as well as the linked CSS2/3 property support test) look very interesting; I am looking for quite a bit more information than that, but your code will definitely be useful.I do think it would be worthwhile and useful for other developers if you packaged it as a library... *prod* ;)
lingro