Category Archive:

Mobile Browser Reported Screen Sizes – Jan 2012

0

HTML5 / CSS3 development for mobile browsers needs to be aware of the reported screen size to effectively build a mobile site.

However, the screen resolution listed in the device specifications is NOT the same as what is reported by the mobile browser itself. Specifically, what is the window size information available via JavaScript using window.innerWidth and window.innerHeight. It is usually very different than the device’s screen resolution.

The iPhone and iPad are consistent and predictable. All iPhones report a window size of 320 x 460, and all iPads report a window size of 768 x 1004.

The ‘fun’ part is supporting the wide variety of window sizes on Android devices. However, it is exceptionally hard to find data on the window size different devices report via JavaScript.

A month ago I released a mobile app for Android and iOS called ScoreKeepr. During the update check to my server, the app reports the device’s windows size.

Here are the most common reported screen sizes for Android devices (in Portrait orientation):

Android phones
320 px width – 90% of devices queried
360 px width – 10% of devices queried

Android tablets
800 px width – 1 device reporting (insufficient data)

Using this information, you can more easily develop your CSS media queries, knowing what sizes your app is likely to encounter in the wild.

This will be an ongoing monthly report, and will reflect different reported window sizes when new devices are introduced. By regularly reporting this information, a trend over time can be identified.

What information are you collecting from your apps? Please share your suggestions for additional anonymous information to collect. Information must be available via JavaScript query.

UPDATE FEB 1st: final numbers for January 2012 included


Continue Reading

WebSockets supported in iOS 4.2

2

Apple released iOS 4.2 in November 2010, and part of that release was support for websocket in the web browser.

This was confirmed in a visit to a local Apple store. Here are some screencaps grabbed of the iPhone 4:

   

iOS 4.2 is also available for the iPad, which is a huge improvement. iOS 4.0 was only for the iPhone, and the iPad was still using iOS 3. Here are the iPad screencaps to confirm websocket support on the iPad:

   

Apple had websocket support in the beta of iOS 4.0, but removed it before release. Whatever reason it was not included iOS 4.0 must have been resolved in iOS 4.2.

Creative Commons License
WebSockets supported in iOS 4.2 by Jim Bergman is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Permissions beyond the scope of this license may be available at http://jimbergman.net/about.


Continue Reading

My iOS & Android Apps

Elsewhere on the web

Jim's book recommendations, favorite quotes, book clubs, book trivia, book lists (read shelf)

Like this page?

Popular Posts


FreshBooks



SPECIAL Offer! Save 20% off all New Hosting Plans!