Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unique tab ID appended to user agent string in Chrome for iOS?

As I was testing my web app in Chrome for iOS (both iPhone and iPad), I noticed a weird ID appended to user agent string, e.g.:

    alert(navigator.userAgent)

would produce something like this (note the "3810AC74-327F-43D7-A905-597FF9FDFEAB" part at the end):

    Mozilla/5.0 (iPhone; CPU iPhone OS 5_1_1 like Mac OS X; en-us) AppleWebKit/534.46.0 (KHTML, like Gecko) CriOS/21.0.1180.77 Mobile/9B206 Safari/7534.48.3 (3810AC74-327F-43D7-A905-597FF9FDFEAB)

This ID seems to be tab specific and persists even when going to a different site.

My question is, if anyone knows anything about this and what it may be used for?

Update:

This GUID was appended to overcome the limitations of UIWebView. Kudos to eric for pointing this out in the comments.

like image 801
chromice Avatar asked Nov 12 '22 23:11

chromice


1 Answers

That ID is not related in any way to tracking.

There is a chromium bug that goes into the details of why it is necessary: basically, it's needed in order to implement tabs.

From the bug tracker:

There is no API in iOS to know, in the network layer, from which UIWebView a network request is coming from.

[...] the solution [...] all the UIWebViews get the tabID (which is only local to the device) added to the user agent string.

You might also want to check a few twitter threads discussing this with further info.

like image 160
Razor Avatar answered Nov 15 '22 12:11

Razor