Has anyone found the iPhone 4's browser's user-agent string yet?
-
On this SO answer, you can find a generic regular expression to check if a given user agent string is a iOS 4 one.Stephan– Stephan2012-09-25 11:32:19 +00:00Commented Sep 25, 2012 at 11:32
-
@Stephan: no, you can't. There is no difference between iPhone 3 or 4 or whatever.Andy– Andy2015-06-02 09:06:51 +00:00Commented Jun 2, 2015 at 9:06
7 Answers
Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7
6 Comments
You can use:
To find your user agent (Google: "What is my user agent" gives this answer)
5 Comments
- Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Mobile/7D11
- Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7
- Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0_1 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A306 Safari/6531.22.7
- Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_1 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8B5097d Safari/6531.22.7
- Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_2 like Mac OS X; en_us) AppleWebKit/525.18.1 (KHTML, like Gecko)
- Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_2_1 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5
...for now
Comments
This site seems to keep a complete list that's still maintained
iPhone, iPod Touch, and iPad from iOS 2.0 - 5.1.1 (to date).
You do need to assemble the full user-agent string out of the information listed in the page's columns.
1 Comment
You cannot identify the (hardware) version of an iPhone by user agent.
It's only possible to recognize that it's an iPhone and which software versions it's running.
Using the Safari User Agent String
Not even WURLF can.
Comments
Note: The user agent strings from Facebook's internal browser do indicate the actual physical device. Even the cellphone carrier (eg. AT&T)
Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Mobile/14G60 [FBAN/FBIOS;FBAV/149.0.0.39.64;FBBV/79173879;FBDV/iPhone7,2;FBMD/iPhone;FBSN/iOS;FBSV/10.3.3;FBSS/2;FBCR/AT&T;FBID/phone;FBLC/en_US;FBOP/5;FBRV/0
Mozilla/5.0 (iPhone; CPU iPhone OS 11_1 like Mac OS X) AppleWebKit/604.3.5 (KHTML, like Gecko) Mobile/15B93 [FBAN/FBIOS;FBAV/148.0.0.45.64;FBBV/78032376;FBDV/iPhone10,4;FBMD/iPhone;FBSN/iOS;FBSV/11.1;FBSS/2;FBCR/AT&T;FBID/phone;FBLC/en_US;FBOP/5;FBRV/0]
These won't be the case in Safari or Chrome from iOS - only within the browser inside the Facebook app.
(I'm getting iPhone9 too though - not quite sure what that is!)