HTML5移动应用程序[已关闭]

I start a new mobile application using jQuery Mobile. Basically it will pull Events and Gallery from Facebook.

1.Normal PHP files will be on server and I will just make a Ajax request to them. Like this:

$.ajax({
   type:"POST",
   url : "www.example.com/example.php",
   data : somedata,
   dataType : 'json',

2.If I will make it like this with no Internet connetion it will show error.

There is a way to save(cache) the last call to server?

And if new call is made and ther is no Internet Conenction or Bad Request or any other error and empty response, show the latest good response!

Thank you for any suggestions.

1.It is normal if PHP files will be on server and I will just make a Ajax request to them.?

Sure it is.

2.There is a way to save(cache) the last opretaions?

Of course. You could try the HTML5 application cache, or other server-side (PHP) methods.