I would like to programmaticaly determine the DPI of a user\'s display in order to show a web page at a precise number of units (centimeters/inches). I know it a weird request:
You can't. DPI is a function of the pixel resolution of the screen and the physical dimensions of the display. The latter is not available in any browser interface I am aware of.