JayBizzle / Crawler-Detect

🕷 CrawlerDetect is a PHP class for detecting bots/crawlers/spiders via the user agent
https://crawlerdetect.io
MIT License
1.96k stars 255 forks source link

Chrome will stop using User-Agents #413

Open JayBizzle opened 3 years ago

JayBizzle commented 3 years ago

Need to look into this...

https://web.dev/user-agent-client-hints/

JayBizzle commented 3 years ago

Related

https://github.com/serbanghita/Mobile-Detect/issues/824

https://github.com/jenssegers/agent/issues/165

SoranDK commented 1 year ago

Doesn't seem to have any effect on this script...

https://blog.chromium.org/2021/05/update-on-user-agent-string-reduction.html:

Our plan was designed with backwards compatibility in mind, and while any changes to the User Agent string need to be managed carefully, we expect minimal friction for developers as we roll this out (i.e., existing parsers should continue to operate as expected).

If your site, service, library or application relies on certain bits of information being present in the User Agent string such as Chrome minor version, OS version number, or Android device model, you will need to begin the migration to use the User Agent Client Hints API instead.

If you don’t require any of these, then no changes are required and things should continue to operate as they have to date.

In some ways Chrome is playing catch up on this front: Safari was the first to cap the macOS version number in the UA string and Firefox has followed suit. Firefox has also capped the Windows version number to 10.

So they are not stopping sending User-Agents... They are just more general in version numbering to make it less unique.

From: Mozilla/5.0 (Linux; Android <androidVersion>; <deviceModel>) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<majorVersion>.<minorVersion> <deviceCompat> Safari/537.36

To: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<majorVersion>.0.0.0 <deviceCompat> Safari/537.36