In webkit you can detect if your user has a so called “high dpi screen” by simply retrieving the value from:
window.devicePixelRatio
Normal dpi screens will return 1.
The iPhone 4 will return 2, but numbers like 1.8 or 2.12 are also possible.
More Related Contents:
- regular expression [closed]
- check if link “still” exists [duplicate]
- Is the following code valid? [closed]
- How to send email out by php or javascript? [closed]
- Pass a PHP string to a JavaScript variable (and escape newlines) [duplicate]
- Convert php array to Javascript
- How to save a PNG image server-side, from a base64 data URI
- Send JavaScript variable to PHP variable [duplicate]
- How to create websockets server in PHP
- Keep values selected after form submission
- Pass Javascript Array -> PHP
- Difference between Javascript and PHP [closed]
- How to execute ajax function onbeforeunload?
- Change DIV content using ajax, php and jQuery
- How do I immediately execute an anonymous function in PHP?
- How to load PHP file into DIV by jQuery?
- how to write javascript code inside php
- Access GET directly from JavaScript?
- How to pass a Javascript Array via JQuery Post so that all its contents are accessible via the PHP $_POST array?
- Show/hide fields depending on select value
- How to save webpage as a image file using PHP?
- Disable browser cache in PHP or JavaScript in a Flash application
- Jquery: Running AJAX locally without a webserver
- Detect if Android app has been installed on the device using a mobile web page – PHP and JS
- Multiple javascript/css files: best practices?
- How can I pass variables from JavaScript to PHP?
- How to download a file on clicking the name of file using PHP?
- Detect Ajax calling URL
- passing php string with multiple lines to a javascript function/variable
- How to assign Php variable value to Javascript variable? [duplicate]