You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/06/11 17:05:01 UTC

[jira] [Commented] (CB-3360) Set custom InAppBrowser user-agent

    [ https://issues.apache.org/jira/browse/CB-3360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14582034#comment-14582034 ] 

ASF GitHub Bot commented on CB-3360:
------------------------------------

Github user samkelleher commented on the pull request:

    https://github.com/apache/cordova-plugin-inappbrowser/pull/94#issuecomment-111166441
  
    One side effect of this is that the main cordova webview will also have its userAgent changed (navigator.appVersion) once at least one instance of InAppBrowser has been created. It seems the userAgent setting will apply to all webviews.


> Set custom InAppBrowser user-agent
> ----------------------------------
>
>                 Key: CB-3360
>                 URL: https://issues.apache.org/jira/browse/CB-3360
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: Android, BlackBerry, Plugin InAppBrowser, WP8
>    Affects Versions: 2.7.0
>         Environment: iOS, Android, WP8, BlackBerry
>            Reporter: Kevin Simpson
>            Priority: Minor
>              Labels: Cordova, InAppBrowser, android, cordova-ios-4.0.x
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org