Feb. 27, 2012: A small update, v0.5.1, was made to Detector to clean up PHP Notices as well as add two methods to push Detector data to the browser so the data can be used a la Modernizr.
The following are the major changes in this release:
I was unhappy with the original browser detection library in Detector so I created a PHP-based pseudo-fork of the ua-parser project called ua-parser-php. It is included as a submodule of Detector and provides a much more robust classification system for browsers and mobile devices. Because of the number of attributes it parses out of a user-agent string it should give developers more flexibility when developing solutions.
With the new families feature in Detector developers can organize browsers that share certain traits into groupings. With families a developer can test for a browser’s grouping rather than each individual feature that browser may support when displaying content. This might be especially useful for templating solutions.
Expanded Feature Tests
Modernizr 2.5.2 has been included with this release as well as an expanded set of features including tests for cssremunit, deviceorientation, devicemotion, and lowbandwidth support. See the full list of Detector’s core tests.
Detector Wiki Added
I’ve attempted to grow the documentation for Detector beyond the original, limited README by using the wiki that comes with a GitHub repository. Content includes:
- How Detector Works
- Adding & Using Detector With Your Application
- Detector Test Tutorial
- Detector Family Tutorial
- Templating with Detector & Mustache Tutorial
Those are the big changes but their are a few other, minor changes:
- a configuration file for setting debug mode as well of locations of files & directories is now included
- both core and extended profiles can now be versioned
- the original layout of the files has been cleaned up some
- two simple demos, one for including a YouTube video and the other for templating, are now included
- while not a change in Detector per se, the archive of user agents now contains 170+ user agents and their associated feature tests
If you have any questions about the project please feel free to drop a line in the comments.