Skip to content

Conversation

@chrisdavidmills
Copy link
Contributor

Description

Chromium browsers support User-Agent reduction, which means that features such as the User-Agent HTTP header provide less-specific information in an effort to reduce their effectiveness for fingerprinting/tracking.

This PR adds information on User-Agent reduction to appropriate places on MDN, as well as a new guide to cover it, and some extra information on client-side hints.

This PR is part of the final set of privacy sandbox information to be added to MDN. Much of it is being removed, but this feature is stable and will be kept, so it should be added.

Motivation

Additional details

Related issues and pull requests

@chrisdavidmills chrisdavidmills requested review from a team as code owners October 23, 2025 14:41
@chrisdavidmills chrisdavidmills requested review from hamishwillee, pepelsbey and sideshowbarker and removed request for a team October 23, 2025 14:41
@github-actions github-actions bot added Content:WebAPI Web API docs Content:HTTP HTTP docs labels Oct 23, 2025
@chrisdavidmills chrisdavidmills changed the title Add information to MDN about User-Agent reduction Technical review: Add information to MDN about User-Agent reduction Oct 23, 2025
@github-actions github-actions bot added the size/m [PR only] 51-500 LoC changed label Oct 23, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 23, 2025

Preview URLs (6 pages)
Flaws (3)

Note! 5 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/HTTP/Guides/User-agent_reduction
Title: User-Agent reduction
Flaw count: 3

  • unknown:
    • No generic content config found
    • no blog root
    • no blog root
External URLs (4)

URL: /en-US/docs/Web/HTTP/Guides/Client_hints
Title: HTTP Client hints


URL: /en-US/docs/Web/HTTP/Guides/User-agent_reduction
Title: User-Agent reduction

(comment last updated: 2025-10-28 11:18:37)

@Josh-Cena Josh-Cena changed the title Technical review: Add information to MDN about User-Agent reduction Technical review: Information about User-Agent reduction Oct 23, 2025
@hamishwillee
Copy link
Collaborator

@chrisdavidmills Can you ping me directly when ready for editorial reveiw.

Copy link

@miketaylr miketaylr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks Chris. Just one note, but not sure it requires any edits.

@chrisdavidmills
Copy link
Contributor Author

LGTM - thanks Chris. Just one note, but not sure it requires any edits.

Super cool, thanks for the review, @miketaylr! I'll move this one on to the editorial review stage, but feel free to chime in if you notice anything else that needs attention.

@chrisdavidmills chrisdavidmills changed the title Technical review: Information about User-Agent reduction Editorial review: Information about User-Agent reduction Oct 24, 2025
Copy link
Collaborator

@hamishwillee hamishwillee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Some comments, the most important one is probably https://github.com/mdn/content/pull/41648/files#r2464158868 - lots of duplication with the Client Hints guide.

Client hints are broadly divided into high and low entropy hints.
The low entropy hints are those that don't give away much information that might be used to create a [fingerprinting](/en-US/docs/Glossary/Fingerprinting) for a user.
The low entropy hints are those that don't give away much information that might be used to [fingerprint](/en-US/docs/Glossary/Fingerprinting) a user.
They may be sent by default on every client request, irrespective of the server `Accept-CH` response header, depending on the permission policy.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't on you, but we should define what we mean by permission policy here, because normally this means a specific permission, and there is no client hints permission.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: permissions and permissions policies are related, but different. And client hints do define a number of policy controlled features (which is what a permission policy controls), but you're correct that they're not powerful features (which is what permissions control).

https://w3c.github.io/webappsec-permissions-policy/
https://w3c.github.io/permissions/

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

G'day @miketaylr

Thanks. So to be clear, you're saying that I might set a policy for access to the various features using https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Permissions-Policy with one of the linked permission names?
So by default Width is available to the current origin but if I want to to be available to some other origin in a nested context I could set Permissions-Policy: ch-width=* (say) to get permission?

The reason I ask is that the existence of this level of permissions is unknown to me, and likely unknown to the rest of MDN. The things I/we know about are listed here https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Permissions-Policy#directives

Off hand do you know of many other similar lists of permissions. I can make sure they get added if we know about them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added links to the list of permission polices in the spec for now. I'd previously added a link to the User-agent reduction article, but that section then got removed.

It isn't a perfect solution, but I don't want to document those 22 new permissions policy directives as part of this PR. I think that's a follow-up job.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. Not closing this as resolved yet, because I'm hoping @miketaylr might respond to my question above on "other lists".

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hamishwillee I'm sorry to have missed the ping here!

So by default Width is available to the current origin but if I want to to be available to some other origin in a nested context I could set Permissions-Policy: ch-width=* (say) to get permission?

Yep, that's exactly correct. And yes, the discoverability for each of these permissions policy is quite low.

We (the permissions and permissions policy editors) had hoped to improve that via https://w3c.github.io/permissions-registry/, which would eventually cover permissions policies in addition to powerful features (aka, permissions)... but some folks had strong feelings against it and that was enough stop energy to just give up. For now, https://dontcallmedom.github.io/webdex/p.html#policy-controlled%20feature%40%40permissions-policy%25%25dfn is probably the best source of truth (modulo spec bugs that don't link things correctly).

Copy link
Collaborator

@hamishwillee hamishwillee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better IMO. Few more nittish things.

Copy link
Collaborator

@hamishwillee hamishwillee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @chrisdavidmills - this holds together well IMO.

@hamishwillee hamishwillee merged commit 0b852c3 into mdn:main Oct 28, 2025
8 checks passed
@chrisdavidmills chrisdavidmills deleted the ua-reduction branch October 29, 2025 09:40
@chrisdavidmills
Copy link
Contributor Author

Thanks @chrisdavidmills - this holds together well IMO.

Lovely, thanks @hamishwillee, and thanks to @miketaylr for the tech review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:HTTP HTTP docs Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants