The Modernizr detection library is a popular way of pulling which features can run properly for which users. This allows developers to serve up webpages that offer the highest level of capability to individuals.
Since Modernizr is open source it does invite developers to create their own additions. One such extension is called Detectizr which collects technical info like browser version, device screen size, operating system, and more.
The project’s GitHub page actually lists all possible features which include:
- device
- device model
- screen size
- operating system + OSÂ version
- browser type +Â browser version
- browser engine
- browser plugins
Many developers hand this task off to backend languages such as PHP or Ruby. But a frontend scripting lang like JavaScript can easily handle the task – and with Detectizr it’s even easier!
The project was created by Baris Aydinoglu and released for free on GitHub.
If you’re a big fan of Modernizr then check out this JS extension and see if you can put it to good use. The minified version is ~8kb with options to enable/disable certain unused features at your whim.
For setup info & code snippets check out the GitHub repo for everything you need to know about Detectizr.
Leave a Reply