Device Capabilities Detection Proxy
npm install devcaps
|2||downloads in the last month|
|Version||0.0.0 last updated 2 years ago|
|Dependencies (6)||async, cookies, debug, formatter, getit, qs|
devcaps - Device capabilities discovery
It's like Modernizr for the server-side. In actual fact, the devcaps approach is simply a technique for invoking client-side detection as required and passing that information to the server side.
The devcaps project has been started for a couple of reasons:
Server-side customization of mobile web applications is currently necessary if you are going to build effective and efficient mobile web apps.
Current device detection techniques tend to use either WURFL or naive
User-Agentdetection to determine the device that is accessing the site.
We can do better. For clientside development we have progressed beyond the dark ages of User-Agent Sniffing to much more reliable (and useful) Feature Detection techniques. It's time that did something to bring these techniques to the server side.
The devcaps handshake process is similar in execution to the way authentication is implemented in most web applications:
The devcaps cookie format has been revised and is now even more compact. The following is a good example of a valid
The above cookie (which indicates that both canvas and websockets are supported) is an example of Modernizr properties that have a shortcode associated with it. If a Modernizr capability is tested for that does not have a corresponding shortcode, this will be included in the cookie in it's full form.
+2d+sk+canvastext would be a valid cookie value if a test for
Modernizr.canvastext had been requested and passed. Of course, if a short code is eventually included canvastext then the shortcode would be used here instead.
To be completed.