Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get/append user agent #1490

Open
jf908 opened this issue Feb 18, 2025 · 0 comments
Open

Get/append user agent #1490

jf908 opened this issue Feb 18, 2025 · 0 comments

Comments

@jf908
Copy link

jf908 commented Feb 18, 2025

Is your feature request related to a problem? Please describe.
I would like to be able to append a string to the current user agent. Since some websites unfortunately use the user agent to detect certain things, it would be nice to be able to keep the webview's current user agent but also append something to the end of it identify it as something different.

Describe the solution you'd like
I think this could be implemented one of two ways:

  1. Add a way to get/set the webview user agent after it has been initialized.
  2. Add a flag/enum to append the user agent rather than replace it.

1 seems more flexible and intuitive, 2 would be easier to implement.

I'm unsure if this would be able to be supported on all platforms, but it definitely would be for Webview2 on Windows.

Describe alternatives you've considered
I could record the user agent and set it manually but it would eventually become out of date on platforms like Windows where the OS keeps the browser/user agent version up to date.

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

No branches or pull requests

1 participant