7

I have boiled down my issue to a very simple scenario and it appears to be with iOS 9+ and UIWebView with a website that has lots of page loads (like you would get from navigating).

I followed this tutorial (http://conecode.com/news/2011/05/ios-tutorial-creating-a-web-view-uiwebview/) to build a simple iOS app with a UIWebView. I pointed the UIWebView at a static html that looks like what I have at the bottom.

I then refreshed the page with the button (or the script that does it automaticly) and eventually the app grows slower and slower (usually around 50-80 refreshes). I have the list in the page for demonstration because it allows you to scroll, which highlights the issue much sooner.

Any help or direction for me to look into resolving this issue?

<!DOCTYPE html>
<html lang="en">
<head></head>
<body>
<FORM><INPUT id="demo" TYPE="button" onClick="history.go(0)" VALUE="refresh"></FORM>
    <ul data-role="listview" >
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
                <li>This is an Item</li>    
    </ul>
    <script>
        var elem = document.getElementById("demo");
        elem.value = Date();
        location.reload();
    </script>    
</body>
</html>
rmaddy
  • 314,917
  • 42
  • 532
  • 579
XenoPuTtSs
  • 1,254
  • 1
  • 11
  • 31
  • I resolved my issue by putting in a hack in my application to keep track of the number page loads and after an arbitrary number of loads, I unload the control and re-add it. There was some extra BS to go along with this to make it seemless to the user. But in essence it is a hack and not the proper way of doing it. – XenoPuTtSs Jan 08 '16 at 15:48
  • https://github.com/kirbysayshi/vash/issues/72 Please have a loot at this issue.Perhaps it helps – Muhammad Zohaib Ehsan Jan 14 '16 at 19:15

1 Answers1

2

Maybe a memory issue.
Watch the Memory Report (enlarge with double click) in Xcode while running the project and reloading/navigating the UIWebView.

enter image description here

If it is growing, try to delete the UIWebViews cache

Clearing UIWebview cache

Community
  • 1
  • 1
Yedy
  • 2,107
  • 1
  • 25
  • 30
  • Although I wasn't seeing the memory increase like your screen shot, this did help with performance in my test application. – XenoPuTtSs Jan 16 '16 at 16:23