Javascript innerWidth gives default value in iOS 8.x

161 Views Asked by At

I'm using the Javascript innerWidth property in browsersize.zomdir.com to show the current viewport. Recently I discovered that on an iPhone 4s the innerWidth was 980 pixels instead of 320 pixels. I know that according to Apple 980 pixels is the default width.

That's strange because I have the code

<meta name="viewport" content="width=device-width" />

in the head section of the page and haven't changed the code of the website.

I got the following results:
iPhone 4s, iOS 7.1.2, Safari - innerWidth: 320 pixels
iPhone 4s, iOS 8.3, Google Chrome - innerWidth: 320 pixels
iPhone 4s, iOS 8.3, Safari - innerWidth: 980 pixels

Is this a bug? Did I do something wrong? Is there a workaround?

Thanks, and best regards,
Hans

BTW At my blog I have some screenshots of the results

0

There are 0 best solutions below