Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a database of 'CSS pixel ratio' values for various devices?

Here's what I want to do: when I get an HTTP request, check a database server-side to look up 1) the physical device PPI, and 2) CSS pixel ratio (i.e. the number of "logical" or "reference" pixels per physical pixel). This allows me to supply the requesting browser with a pixel value equal to 1 physical, real world inch.

Some things I've tried already that didn't pan out:

  • http://wurfl.sourceforge.net/: gives me physical size and resolution (so I can compute PPI), but not CSS pixel ratio.
  • http://51degrees.mobi/: gives me physical size and resolution (so I can compute PPI), but not CSS pixel ratio.
  • https://deviceatlas.com - gives me PPI directly, but no CSS pixel ratio.

Oddly, the best data source (free or paid) that I've found for this is http://en.wikipedia.org/wiki/List_of_displays_by_pixel_density, but I want to get more comprehensive and way more tabular.

like image 236
Matt Korostoff Avatar asked Nov 13 '22 11:11

Matt Korostoff


1 Answers

I too have been searching for this information and have found the Wikipedia page you referenced to be the greatest resource available so far. Additionally, I've found this resource helpful: http://bjango.com/articles/min-device-pixel-ratio/

like image 156
Dave Harper Avatar answered Nov 28 '22 17:11

Dave Harper