aria-practices icon indicating copy to clipboard operation
aria-practices copied to clipboard

Infrastructure: Pull updated user agent strings for `link-checker`

Open howard-e opened this issue 7 months ago • 0 comments

This seems good enough, and will fix the bug in the short term, but will probably break again in a few months.

Certainly true.

I did a little research and ran into https://www.npmjs.com/package/user-agents - a package that someone has automated to collect the most popular user agents used on their own websites and it can generate "always up to date" user agents. We may want to look into using this package instead.

After a bit more research and a comment from @howard-e - https://github.com/DavideViolante/useragents-me-api/ looks like a much better choice

Not so much a fan for adding an extra lib for this small use case. Agreed on making this more future-proof, with the hardcoded string as a fallback. Fetching from the source site of that lib (specifically https://www.useragents.me/#most-common-desktop-useragents) is a good enough option to do in the future, to move this PR along.

Originally posted by @howard-e in https://github.com/w3c/aria-practices/issues/3264#issuecomment-2894500030

howard-e avatar May 20 '25 13:05 howard-e