Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Newsroom Update

Apple is introducing a new Apple Watch Pride Edition Braided Solo Loop, matching watch face, and dynamic iOS and iPadOS wallpapers as a way to champion global movements to protect and advance equality for LGBTQ+ communities. Learn more >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Cannot detect iPhone 4 for mobile site development?

Hi all,

1st post on the forums... not even sure if this is the right place to post this?

I work for a digital marketing agency which builds bespoke internet and mobile sites and we cannot detect the iPhone 4 via the usual method of using its user agent. We deliver device specific mobile downloads on a lot of our sites and because the iPhone 4 has its lovely hi res 640x960 resolution, naturally we want to be able to deliver video / image content to maximise the iPhone 4 user's experience.

The problem is that the user agent for the iPhone 4 is identical to all other iPhones, it is only specifying the OS version not the hardware.

We know that we can do something to detect the viewport size using javascript but to be honest that's a bit hacky.

Surely the iPhone 4 should identify itself as such via the traditional method contained in the user agent?

Cheers!

iPhone, iOS 4, iPhone 4

Posted on Jul 13, 2010 9:15 AM

Reply
2 replies

Cannot detect iPhone 4 for mobile site development?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.