Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What would be the User Agent string for iPhone 8, iPhone 8 Plus and iPhone X?

In a device detection, what would be the user agent for the new iPhone 8, iPhone 8 Plus and iPhone X?

like image 530
Tushar Vaghela Avatar asked Sep 17 '17 05:09

Tushar Vaghela


People also ask

What is iPhone user agent string?

The User-Agent (UA) string is contained in the HTTP headers and is intended to identify devices requesting online content. The User-Agent string tells the server what the visiting device is (among many other things) and this information can be used to determine what content to return.

What is user agent example?

A user agent (short: UA) is software that communicates with servers in a network. An example would be a web browser that retrieves a web page from a server on the internet and displays it. The user agent acts as a mediator between the user and the web server just like a human agent.

What is AppleWebKit 537.36 Khtml like Gecko used for?

AppleWebKit/537.36 indicates what browser rendering engine is used. A rendering engine is what transforms HTML into an interactive webpage on the user's screen. The WebKit browser engine was developed by Apple and is primarily used by Safari, Chromium, and all other WebKit-based browsers. (KHTML, like Gecko).


2 Answers

Here is the user agent string for them:

Mozilla/5.0 (iPhone; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.25 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1

Source:

The iOS 11 firmware model number is 15A372. Here is a user agent from a beta version of iOS 11, which has the AppleWebKit and Safari version number.

like image 82
Tamás Sengel Avatar answered Sep 22 '22 18:09

Tamás Sengel


As far as I know, user agent for iPhone 8, iPhone 8 plus and iPhone X are same. To detect device we need to check screen size of the device.

iPhone 8 - (750px x 1334px)

Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1

iPhone 8 Plus - (1242px x 2208px)

Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1

iPhone X - (1125px x 2436px)

Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1

like image 43
Tushar Vaghela Avatar answered Sep 21 '22 18:09

Tushar Vaghela