Device screen width and height is incorrect
Posted: Thu Apr 02, 2015 12:10 am
Hi , I am using Google Chrome's Developer Tools to emulate different mobile and tablet device. My major interest is to find the device screen width and height in pixels.
I created a sample ASP.Net website and testing it using Google Chrome's device emulator. I am using the following capabilities from WURFL cloud to retrieve the device screen width and height in pixels.
1) resolution_width
2) resolution_height
3) max_image_width
4) max_image_height
The cloud service doesn't gives me correct results. Below are my results -
iphone 6 User Agent from Google device emulator is
Mozilla/5.0 (iPhone; CPU iPhone OS 8_0 like Mac OS X) AppleWebKit/600.1.3 (KHTML, like Gecko) Version/8.0 Mobile/12A4345d Safari/600.1.4
Google tells the screen size of iphone 6 is 375 x 667
But WURFL cloud gives me
1) resolution_width - 640
2) resolution_height - 960
3) max_image_width - 320
4) max_image_height - 480
Samsung Galaxy S4 User Agent from Google device emulator is
Mozilla/5.0 (Linux; Android 4.2.2; GT-I9505 Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.59 Mobile Safari/537.36
Google tells the screen size of Samsung Galaxy S4 is 360 x 640
But WURFL cloud gives me
1) resolution_width - 1080
2) resolution_height - 1920
3) max_image_width - 360
4) max_image_height - 400
I am not sure why there is a discrepancy in the device width and height. Please correct me if I am wrong. Is there any other capability I can use.
I created a sample ASP.Net website and testing it using Google Chrome's device emulator. I am using the following capabilities from WURFL cloud to retrieve the device screen width and height in pixels.
1) resolution_width
2) resolution_height
3) max_image_width
4) max_image_height
The cloud service doesn't gives me correct results. Below are my results -
iphone 6 User Agent from Google device emulator is
Mozilla/5.0 (iPhone; CPU iPhone OS 8_0 like Mac OS X) AppleWebKit/600.1.3 (KHTML, like Gecko) Version/8.0 Mobile/12A4345d Safari/600.1.4
Google tells the screen size of iphone 6 is 375 x 667
But WURFL cloud gives me
1) resolution_width - 640
2) resolution_height - 960
3) max_image_width - 320
4) max_image_height - 480
Samsung Galaxy S4 User Agent from Google device emulator is
Mozilla/5.0 (Linux; Android 4.2.2; GT-I9505 Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.59 Mobile Safari/537.36
Google tells the screen size of Samsung Galaxy S4 is 360 x 640
But WURFL cloud gives me
1) resolution_width - 1080
2) resolution_height - 1920
3) max_image_width - 360
4) max_image_height - 400
I am not sure why there is a discrepancy in the device width and height. Please correct me if I am wrong. Is there any other capability I can use.