Inspired by the Modernizr library, Conditionizr provides a way to detect browser Retina and pixel ratio, and supply the appropriate JS and CSS assets.Developed in a collaboration between Todd Motto and Mark Goodyear, Conditionzr was originally created to work on top of jQuery. But since v2, the library has been redone to work with Vanilla JS, achieving a 50% increase in speed as well.
Using Conditionzr, developers will always be able to deliver the site version most appropriate for the user's devices, serving Retina or other 2x images to appropriate devices, while also sending polyfills and other shims to visitors with older browser versions.
Conditionizr is perfect for implementing a “progressive enhancement” on Web pages, and it helps developers acquire safe and recommended working habits by using it alongside Modernizr in their apps.
For Git freaks, Conditionizr development is also handled via GitHub as well.
Download Conditionizr from our Scripts section here.