Coder Social home page Coder Social logo

Comments (11)

NielsLeenheer avatar NielsLeenheer commented on June 14, 2024

Could you post an example user agent string?

from parser-php.

NielsLeenheer avatar NielsLeenheer commented on June 14, 2024

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.

NielsLeenheer avatar NielsLeenheer commented on June 14, 2024

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.

NielsLeenheer avatar NielsLeenheer commented on June 14, 2024

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.

yun1129 avatar yun1129 commented on June 14, 2024

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.

NielsLeenheer avatar NielsLeenheer commented on June 14, 2024

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.

yun1129 avatar yun1129 commented on June 14, 2024

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.

yun1129 avatar yun1129 commented on June 14, 2024

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.

NielsLeenheer avatar NielsLeenheer commented on June 14, 2024

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.

yun1129 avatar yun1129 commented on June 14, 2024

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.

NielsLeenheer avatar NielsLeenheer commented on June 14, 2024

This change has now been implemented on the upcoming version of HTML5test.com

from parser-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.