0

I am using a UIWebView to show a couple websites within my app.

I have noticed that even when the view is not active / visible (say when I move to another tab), it still updates HTML refresh messages.

stopLoading does nothing as the pages are already loaded .

How do I get the UIWebView to "ignore" ongoing HTML refresh messages?

I assume some kind of call in webViewDidFinishLoading.

1 Answers1

0

If your delegate is receiving the webView:shouldStartLoadWithRequest:navigationType: message, you can simply return NO to prevent the reload. Or you may be able to inject javascript to disable the reload using stringByEvaluatingJavaScriptFromString:. Otherwise, you're out of luck.

Anomie
  • 92,546
  • 13
  • 126
  • 145
  • how are others trapping these refreshes, I know it has to be going on in a bunch of apps, but maybe devs have just let these refreshes happen in the past. My issue is I have a couple of these views and they start to cause issues with streaming video / audio over cellular. – I H Stewart Apr 30 '11 at 21:38