You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
functionisIE(){constreducedUAString=navigator?.userAgentData?.brands?.map?.(({ brand, version })=>(`${brand}/${version}`),)?.join?.(' ');// for other browsersif(!reducedUAString){return/(MSIE |Trident\/|Edge\/)/.test(navigator.userAgent);}else{// for chromereturn/(MSIE |Trident\/|Edge\/)/.test(reducedUAString);}}
Additional context
User-Agent (UA) reduction is the effort to minimize the identifying information shared in the User-Agent string which may be used for passive fingerprinting. As these changes are rolled out, all resource requests will have a reduced User-Agent header. As a result, the return values from certain Navigator interfaces will be reduced, including: navigator.userAgent, navigator.appVersion, and navigator.platform.
Description
Chrome is changing how much userAgent data they expose to the browser. Usage of navigator.userAgent in https://github.com/remarkablemark/html-dom-parser/blob/master/lib/client/utilities.js#L138 will throw browser warnings in the future.
Possible solution
something like
Additional context
https://developer.chrome.com/docs/privacy-sandbox/user-agent/
The text was updated successfully, but these errors were encountered: