Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-3360

Set custom InAppBrowser user-agent

    XMLWordPrintableJSON

Details

    Description

      Currently you can set a custom user-agent for the main Cordova webview by overriding the init method for the DroidGap class. However, when opening a page in the InAppBrowser, that webview will still contain the default user-agent.

      There are two solutions that I have thought of to this:

      1. Set the user-agent of the InAppBrowser webview to whatever the user-agent in the Cordova webview is set to. (This is what I am currently doing, as it was a one line change, but it requires rebuilding Cordova manually)

      2. Have some sort of configuration option to set the user-agent for the InAppBrowser. This would allow a different user-agent from the main webview, but is also a more involved change.

      Attachments

        Issue Links

          Activity

            People

              shazron Shazron Abdullah
              ktsimpso Kevin Simpson
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: