You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Andrew Grieve (JIRA)" <ji...@apache.org> on 2014/05/21 02:21:38 UTC

[jira] [Commented] (CB-6726) Android Webview Not Intercepting Resource Requests Properly

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

Andrew Grieve commented on CB-6726:
-----------------------------------

Sounds like this is likely a caching issue. Try calling webview.clearCache(true) before loading the page.

> Android Webview Not Intercepting Resource Requests Properly
> -----------------------------------------------------------
>
>                 Key: CB-6726
>                 URL: https://issues.apache.org/jira/browse/CB-6726
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 3.5.0
>            Reporter: Tim Kim
>            Assignee: Andrew Grieve
>
> The shouldInterceptRequest method in IceCreamCordovaWebViewClient.java doesn't seem to fire for every request. Only for things like xhrs or resources prefixed with http://
> Steps to reproduce:
> - pull down latest
> - ./bin/create test
> - cd into test/
> - find the shouldInterceptRequest method in IceCreamCordovaWebViewClient.java and add a log statement to know when it fired
> - ./cordova/run 
> - ./cordova/log 
> - only 'file:///android_asset/www/cordova_plugins.js' will make shouldInterceptRequest fire and not the reference to 'cordova.js' or 'js/index.js'. 
> -  add in ' <script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>' to the index.html to see the shouldInterceptRequest fire
> Tested on 4.4 with cordova-android 3.5.0



--
This message was sent by Atlassian JIRA
(v6.2#6252)