Modernizr
Modernizr is a JavaScript library that detects support for HTML5 and CSS3 features in a user’s browser. Rather than relying on browser detection, Modernizr runs a series of feature tests and exposes the results as boolean properties on a global Modernizr object and as CSS classes on the document’s root element. For example, if the browser supports flexbox, Modernizr.flexbox will be true and the html element will receive a "flexbox" class; if not, a "no-flexbox" class is added. This allows developers to apply progressive enhancement through CSS selectors like .flexbox and .no-flexbox or to conditionally execute JavaScript and load polyfills when a feature is missing.
Modernizr is typically loaded at the start of a page. A developer can either include the full
The project was created by Faruk Ateş and released in the early 2010s as an open-source tool
Criticism and considerations: feature detection can be imperfect for some APIs, and including a large default