[ https://issues.apache.org/jira/browse/CB-2102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13543381#comment-13543381 ]
Shazron Abdullah commented on CB-2102: -------------------------------------- Ok, here's what's happening. This user-agent business was added so that InAppBrowser can circumvent the whitelist. The main UIWebView's user-agent is appended a number (in brackets) that signifies the viewcontroller that a request is from. Sequence of events: 1. Main UIWebView: navigate to any page, back and forth, it's fine 2. Launch InAppBrowser (this sets the User-Agent in the app properties to the original UA, which is picked up by the InAppBrowser, allows us to bypass the whitelist) 3. Close the InAppBrowser 4. Navigate to a new page 5. The new page has the InAppBrowser's UA (the original UA), not the UA for the Main UIWebView Work-around: When the InAppBrowser is closed, we set the UserAgent (in the app properties) back to the Main UIWebView's UA. This might have side effects. > InAppBrowser will not open PDFs on different pages > -------------------------------------------------- > > Key: CB-2102 > URL: https://issues.apache.org/jira/browse/CB-2102 > Project: Apache Cordova > Issue Type: Bug > Components: CordovaJS, iOS > Affects Versions: 2.3.0 > Environment: OSX Mountain Lion, xCode 4.5.2, happens on iPad > simulator 5.0, 5.1, 6.0. > Reporter: Chad Crowell > Assignee: Shazron Abdullah > Priority: Minor > Labels: InAppBrowser > Fix For: 2.3.0 > > > WWW folder is here: https://dl.dropbox.com/u/119908/www.zip > The folder structure here is setup exactly like the much more elaborate > website we are wrapping in Cordova as an "offline website browser" app for my > client. This stripped down version exhibits the same problematic behavior. > Whichever page you view first, the PDFs on that page open in IAB just fine. > Click over to the other page and the PDFs there don't open in IAB. Doesn't > matter which page you go to first, the other page always doesn't work. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira