Skip to content

docs(headers): set the user agent and language with network.emulate - #368

Merged
route merged 1 commit into
mainfrom
docs/emulate-user-agent
Nov 20, 2026
Merged

route merged 1 commit into
mainfrom
docs/emulate-user-agent

Conversation

@route

@route route commented Nov 20, 2026

Copy link
Copy Markdown
Member

Ferrum deprecates changing navigator through User-Agent and Accept-Language set with headers: from 0.22 they are only sent with requests. The examples here showed exactly that usage, so they would warn for anyone copying them.

  • docs/11-headers.md and README.md use plain custom headers in the headers examples, and the headers page shows network.emulate(user_agent:, accept_language:) for the user agent and language.
  • docs/1-introduction.md sets the language with network.emulate.
  • docs/2-customization.md says emulate: sets the device's user agent unless one is set with network.emulate(user_agent:).

network.emulate keeps the device's user agent when only the language is given, and both are reset between tests.

Ferrum deprecates changing navigator through User-Agent and Accept-Language headers, so the examples use
network.emulate for them and plain custom headers for headers.
@route
route merged commit 2557c28 into main Nov 20, 2026
6 checks passed
@route
route deleted the docs/emulate-user-agent branch November 20, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant