cordova-plugin-inappbrowser icon indicating copy to clipboard operation
cordova-plugin-inappbrowser copied to clipboard

Feature Request: Add Setting to Set a Custom User Agent

Open BrandOuellette opened this issue 6 years ago • 6 comments
trafficstars

Feature Request

Option to set the User Agent the InAppBrowser uses.

It would be nice if you could set the User Agent you want sent with requests as one of the options passed when opening the InAppBrowser.

I know you can change it in config.xml for the entire Cordova app, but we just want the requests sent in the InAppBrowser to be a custom user agent string.

BrandOuellette avatar Jul 06 '19 14:07 BrandOuellette

I just looked at the code and it wouldn't take long to add this feature since the InAppBrowser already looks at the OverrideUserAgent preference to set the UserAgent.

BrandOuellette avatar Jul 07 '19 06:07 BrandOuellette

Probably this could be achieved with the PR #363 - maybe you can resurrect this one? ;)

Edit: seems PR #363 is another one of #115

timbru31 avatar Jul 07 '19 17:07 timbru31

It wouldn't be as complicated as #363 but if #363 ever gets merged, it would probably work. Otherwise, this feature would only take a few lines of code for each platform to make it work.

BrandOuellette avatar Jul 08 '19 08:07 BrandOuellette

Let's try to get #363 merged (meaning: tested and reviewed) then.

janpio avatar Jul 08 '19 09:07 janpio

Isn't this a duplicate of #372 ?

HarelM avatar Mar 18 '22 11:03 HarelM