eligrey / eligrey/FileSaver.js

Audit usage of navigator.userAgent, navigator.appVersion, and navigator.platform

Open
#734 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
22k
Forks
4.3k
PR merge metrics
No merged PRs in 30d

Description

### Description
On Chrome there is an audit message when using FileSaver.js 2.0.5.

### Version
2.0.5 (installed via NPM)

### Evidence

![image](https://user-images.githubusercontent.com/405347/143326084-baa1caf0-bae5-415b-ba6b-52c0d72c34d5.png)

> A page or script is accessing at least one of **navigator.userAgent**, **navigator.appVersion**, and **navigator.platform**. Starting in Chrome 101, the amount of information available in the User Agent string will be reduced.
To fix this issue, replace the usage of **navigator.userAgent**, **navigator.appVersion**, and **navigator.platform** with feature detection, progressive enhancement, or migrate to **navigator.userAgentData**.
Note that for performance reasons, only the first access to one of the properties is shown.
[Learn more: User-Agent String Reduction](https://blog.chromium.org/2021/09/user-agent-reduction-origin-trial-and-dates.html)

### Request
Is there any plan to address this?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.