Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6743075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:55:06+00:00 2026-05-26T11:55:06+00:00

iPhone 4+ defaults to 320px resolution for web apps, I want to use the

  • 0

iPhone 4+ defaults to 320px resolution for web apps, I want to use the full 640px.

Can I change this iPhone 4+ behavior to report real resolution?

EDIT:
So i can use,

<meta name="viewport" content="width=640" /> 

but how can I be sure it’s an iPhone 4+ before setting this tag?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T11:55:07+00:00Added an answer on May 26, 2026 at 11:55 am

    The short answer is: you can check the user-agent and set the meta tag with JavaScript.

    The long answer is: don’t do that. I was originally pretty confused about this, too, when I started developing for mobiles. The iPhone 4 (and other high-res devices) actually display the same page width as their predecessors. This is probably due to the fact that sites everywhere would look totally small and probably messed up if they did otherwise. There is a difference, though. High-res phones simply display everything at a higher resolution (but the same dimensions).

    This doesn’t matter for things like text and background colors but you’ll find that images don’t look as crisp on an iPhone – that’s because they’re being resized up. What I do is double the resolution on images, give them fixed with and height to their “non-highres” size, and use -webkit-background-size: 100% 100%;. This way older devices display it like normal, and high-res devices look crisp and nice. The caveat is that this is making your image file size bigger.

    For more information on why a pixel is not always a pixel see this link:
    http://www.quirksmode.org/blog/archives/2010/04/a_pixel_is_not.html

    Additionally if you wanted to target high-res devices specifically with CSS. You can use a media query:

    @media screen and (-webkit-device-pixel-ratio: 2) { 
      body{
         background-color: red;
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does iPhone support XML-RPC, Is their any open source framework which I can use?
I have an iPhone application with a Settings.bundle. This bundle has items with defaults
My client can't read iPhone's default fonts, the size is too small. I have
Can iPhone applications compiled against 2.1 be successfully installed via iTunes on a 2.0
If I create a iPhone tab-style application in XCode (I use 4.2), what should
When the iPhone can't find a GPS signal, it uses Wifi to guess at
I opened default contact list in my iPhone app. Now I want when I
what are the javascript defaults for safari on iphone or ipad? I mean does
Can anyone tell me the RGB for the default iPhone navigation bar blue? I
I'd like to allow users to reset the Defaults in the iPhone's Settings for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.