Question

I would like to save the current state of an UIWebView to disk in IPhone SDK.

I have a UIWebView that loads a website with lots of javascript. I would like to save the UIWebView state, maintaining the state of the javascript variables, http cookies, etc. at that moment.

Then at a later time, I would like to unarchive the UIWebview and display it on the screen with the exact same state as it was when it was archived.

Is this possible?

Was it helpful?

Solution

I tried to do this on a previous project and there's no built-in serialization of UIWebView. There's a couple of ways to cache just the page but not the entire state such as javascript variables. This would require that the JVM's state be serialized as well which is not possible with the current SDK APIs.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top