I've a small app which holds a webview nothing more than that. I'm loading the webview with a url. but when my app is gone background and came back the webview is reloading, For me it should not happen. How to stop webview to reload when app is going to background in iOS and Android.
Note: Both safari(iOS) and chrome(Android) are handling that event with same url even when they've gone background. They are not reloading the webview or data.
This is my code, do I need to add anything more:
iOS:
NSURL* url = [NSURL URLWithString:ip];
[webView loadRequest:[NSURLRequest requestWithURL:url]];
Android:
String url = "http://"+ip+":8081";
webView.loadUrl(url);