OnePlus Chrome, different user agent on AJAX

时间:2018-02-03 11:10:53

标签: android ajax google-chrome mobile

I discovered a very annoying issue with Chrome browser on (some) OnePlus mobile devices. I tested it on 3T, and 5T models. With normal GET request, the browser sends the following user agent to the server:

Mozilla/5.0 (Linux; Android 8.0.0; ONEPLUS A5010 Build/OPR1.170623.032) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.137 Mobile Safari/537.36

But with AJAX XMLHttpRequest the user agent is:

Mozilla/5.0 (Linux; Android 8.0.0; Build/OPR1.170623.032) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.137 Mobile Safari/537.36

Missing the "ONEPLUS A5010" string. What's meaning this difference? I've spent hours to debug, why my project see two different browsers, because i'm using only one.

0 个答案:

没有答案