You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@devicemap.apache.org by Bertrand Delacretaz <bd...@apache.org> on 2012/05/31 17:44:14 UTC

Dynamic probes prototype

Hi devicemap folks (long time no see ;-)

I've just committed a prototype using a "dynamic probes" technique
which detects device features using client-side javascript, and makes
that available both on the client and server sides.

This is inspired by http://detector.dmolsen.com/ and
https://github.com/yiibu/profile - for now my features detection code
is extremely basic, but we can later merge with what was used in the
previous logcapture prototype (using modernizr and platform.js),
and/or collaborate with those other projects on the javascript
features detection code, which is the hard part IMO.

The rest is just fairly simple plumbing, see [1] for a description of
the detection scenario (the code is there BTW).

I've uploaded a runnable jar of that prototype [2], to play with it
start with java -jar that.jar and open http://localhost:8085.

If the DMAP_p cookie is not present or too old (30 seconds for now,
useful for testing), browsing to any page should first redirect to the
DMAP_probe.html page, which runs the features detection code (outside
of any content pages, so conveniently isolated), sets the cookie and
redirects to the originally requested page.

Comments/flames/patches welcome.

-Bertrand

[1] http://svn.apache.org/repos/asf/incubator/devicemap/trunk/prototypes/probefilter/README.md

[2] http://dl.dropbox.com/u/715349/devicemap/probefilter-1.0-SNAPSHOT-r1344766.jar
md5 87691b9e6551fb89d04c932b2ac05d8d