Opened 4 years ago
Last modified 3 years ago
#53451 assigned task (blessed)
Chrome 92 userAgent notice
Reported by: | superpoincare | Owned by: | adamsilverstein |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | minor | Version: | |
Component: | General | Keywords: | |
Focuses: | javascript | Cc: |
Description
Starting Chrome 92, Chrome dev tools will start warning about the usage of navigator.userAgent:
https://blog.chromium.org/2021/05/update-on-user-agent-string-reduction.html
Although it is colored blue and not red and hence not an error message, it's better to not see it.
Many scripts user navigator.userAgent, especially wp-emoji.js which loads on all sites.
A way to continue using it is to see if navigator.userAgentData is true and prevent new Chrome from executing navigator.userAgent.
Attachments (1)
Change History (7)
#2
follow-up:
↓ 3
@
4 years ago
Added a file. I found the results via VS Code's search function. Ignored minified files and external library files which have those. The search query is in the file.
24 script files in total.
#3
in reply to:
↑ 2
@
4 years ago
Replying to superpoincare:
Added a file. I found the results via VS Code's search function. Ignored minified files and external library files which have those. The search query is in the file.
# Query: navigator.userAgent # Excluding: *jquery*,*mediaelement*,*moxie*,*react*,*thickbox*,*tinymce*,*min.js
Thanks! Just noting that Thickbox can be patched too, it's essentially considered an "adopted" library and no longer an external library at this point.
#4
@
3 years ago
- Milestone changed from Future Release to 6.0
- Owner set to adamsilverstein
- Status changed from new to assigned
Time for some userAgent spring cleaning! https://developer.chrome.com/blog/progress-in-the-privacy-sandbox-2021-12/#user-agent-spring-cleaning
Related:
Thanks for the ticket @superpoincare.
Let's start by gathering a list of all the scripts which perform logic based on the value of
navigator.userAgent
then we can go from there.