top | item 9856749

Device Metrics

34 points| gulbrandr | 10 years ago |google.com | reply

8 comments

order
[+] 10dpd|10 years ago|reply
Really unfortunate to see how this has been marked up - div elements with classes corresponding to table elements (e.g. <div class="tr">). For accessibility, why not just use the native semantic elements, e.g. <table>?
[+] theandrewbailey|10 years ago|reply
Site author heard "don't use tables", but not the part "...for layout". Or decided that having the whole page be a table was table layout.
[+] gesman|10 years ago|reply
I wish they'd publish USER_AGENT strings used by browsers within these devices.

That would be nice piece of reference data for all kinds of analytics.

[+] guelo|10 years ago|reply
Computers are capable of running more than one web browser program.
[+] RoryH|10 years ago|reply
That data in API format would be nicer ;-)
[+] tantalor|10 years ago|reply

    $ cat devices.js
    require('request').get(
        'http://www.google.com/design/tool/devices/devices_data.js',
        function (_, _, body) { 
            var window = {};
            eval(body);
            var entry = window.devicesData.feed.entry[+process.argv[2] + 3];
            console.log(entry.device, entry.platform, entry.screendpi);
        });

    $ nodejs devices.js 0
    Android One Android 145

    $ nodejs devices.js 7
    LG G2 Android 141

    $ nodejs devices.js 15
    Nexus 5 Android 148
[+] guelo|10 years ago|reply
It's not that much data. You could copy-paste that into a data structure in your code.