Skip to content

Get/append user agent #1490

Open
Open
@jf908

Description

@jf908

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions