views:

348

answers:

1

Hi all,

I want to see previously viewed web page in iPhone when I will offline (not connected to internet).

Currently I am just opening the web page from my application by using NSURL. But when user is offline he is not able to see the web page.

I have a requirement that user must be able to see the previously viewed web page from my application, when he is offline.

I don't have an idea about saving web page in iphone locally.

My application is not a web app. , it's a game , which provides a link of clients web page.

please help me to solve this.

+3  A: 

You can load your page,

NSString *string = [NSString stringWithContentsOfURL: url encoding: NSUTF8StringEncoding error: &err];

After that you can show it in your webView

[webView loadHTMLString: string baseURL: url];

And you can save/load this string )

oxigen