Comments (11)
Could you post an example user agent string?
from parser-php.
You are using Chrome 44 on Windows 10
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 UBrowser/5.5.9936.1231 Safari/537.36
from parser-php.
I can't reproduce UC Browser being detected as the mobile browser. But I can see that UC Browser does not use the same user agent string internally and externally.
Internal by using Javascript:
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 UBrowser/5.5.9936.1231 Safari/537.36
External headers:
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36
Notice the missing UBrowser token from the external headers. That is why UC Browser for desktop can not be detected by just looking at the browsers. It literally says it's Chrome 44.
from parser-php.
Because WhichBrowser can also look at the user agent string from JavaScript, I've added a special check for this. Will be included in the next release.
from parser-php.
We really did a workaround fix by sending UA without UBrowser for getting WhichBrowser finds the right kernel version(Yes, we ONLY did this from external perspective mentioned above). Once this issue gets fixed my team will get rid of the workaround fix.
from parser-php.
OK, is there a version of UC Browser still available for download that did not include the workaround, so I can reproduce it?
from parser-php.
Technically, we do this control via a config file on our server. Next Monday the team will release a config without the workaround. Will post here to let you know.
from parser-php.
Rightnow, if access html5test.com via UCBrowser it seems the HTML5 score isn't the same with the one of Chrome M44, but the website really says "you are using UC Browser 5.6 on Windows 7", did you do any change on WhichBrowser and it leads to this result? I'm really not sure if this question is proper for you. If not please let me know and any clue would be apprecited.
from parser-php.
I think I know what causes this.
If for some reason feature detection is broken in the browser, the browser will report back that it supports a certain feature - even if you don't. That causes HTML5test.com to count extra points, that are not really deserved. HTML5test.com uses a blacklist to correct this.
Older versions of UC Browser for Mobile are on this blacklist for a number of features. For example form fields are block on UC Browser < 8.6 and the range element and getUserMedia are blocked on UC Browser < 9.8. These problems were confirmed to be in older versions of UC Browser for Mobile, and confirmed to be fixed in later versions.
But the check is just for UC Browser. Not for UC Browser on mobile. And UC Browser for Windows uses a lower version number than mobile. That causes UC Browser for Windows to trigger that blacklist by mistake. And this will causes points to drop.
And yes, I've updated WhichBrowser yesterday to include a workaround for the missing Browser token from the headers causing UC Browser to be properly detected again. So before it didn't trigger the blacklist because it thought it was Chrome. And now it does because it thinks it is UC Browser mobile.
I'll update the blacklist on HTML5test.com.
from parser-php.
Great, you really hit the point! My team released a new config to remove the workaround mentioned in this thread. If you have any question or need help frome me please let me know.
Appreciate your quick response!
from parser-php.
This change has now been implemented on the upcoming version of HTML5test.com
from parser-php.
Related Issues (20)
- Proposal: Set all names to English non-extended Latin character set range to allow automatic translation templates
- Incorrect detection of user agent string
- Invalid
- Undefined property HOT 1
- Brave Browser - Incorrect detection of user agent string HOT 2
- Incompatible with PSR/Cache ^2 HOT 3
- Updating notes for `webOs` browser
- Get brand information HOT 1
- Undetected user agents HOT 1
- Projects with low Build Activity - Survey
- [PHP 8.1] Deprecated functions HOT 3
- Chrome wrong version Detection HOT 3
- Wrong autoload HOT 1
- PHP 8.2 deprecations HOT 10
- Incompatability with automattic/jetpack-autoloader HOT 2
- macOS not detected HOT 3
- $os property non-nullable
- Project abandoned? HOT 3
- SSL certificate expired HOT 1
- Incorrect definition: Chuwi HiPad Max as Apple
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from parser-php.