Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to detect if iPhone has retina display or not?

How can I detect if an iPhone has a retina display or not? Is there a reliable way? Either pure PHP or preferably Zend Framework way of doing this.

like image 475
Richard Knop Avatar asked Jun 13 '12 13:06

Richard Knop


People also ask

Which iPhones have a Retina display?

Learn how to get the most out of the Super Retina display on your iPhone X, iPhone XS, or iPhone XS Max, and the Super Retina XDR display on your iPhone 11 Pro, iPhone 11 Pro Max, iPhone 12, iPhone 12 mini, iPhone 12 Pro, iPhone 12 Pro Max, iPhone 13, iPhone 13 mini, iPhone 13 Pro, or iPhone 13 Pro Max.

Do all iPhones have Retina display?

Which Devices Have Super Retina (XDR) Displays? iPhones with Super Retina displays include the iPhone X, iPhone XS, and iPhone XS Max. Newer iPhone models, including the entire iPhone 12 and iPhone 13 series, use Super Retina XDR displays. In the iPhone 11 series, only the Pro models have Super Retina XDR displays.

How do I know if my iPad is retina?

Identifying iPad models So, knowing if you have a retina display seems to be as easy as looking at your iPad's connector. If 30-pin, you do not have retina display. If Lightening connector, you do have retina.

What qualifies as Retina display?

Retina is a trademarked term that refers to any IPS LCD or OLED display with a pixel density high enough that Apple has determined that your eyes won't be able to make out those pixels at a certain viewing distance.


1 Answers

i figure it out by this

var retina = window.devicePixelRatio > 1;

if (retina)
{
    // the user has a retina display
}
else
{
    // the user has a non-retina display
}
like image 95
Mughal Sahab Avatar answered Oct 02 '22 14:10

Mughal Sahab