Running web app from ios 7 home screen, crashes

Greg O’Lone, thank you for your reply. I will try to explain my trouble with my iPad’s Screen Shots:
I open Safari and navigate to http://brigita.info/cgi-bin/radiobrigita.cgi and app opens in Safari with no problem. (Safari’s cache is cleared, so it is logical there should be no problem with that.) :

Then I “Add to Home Screen” this web app:

When I look at Home Screen on my iPad mini, I see this new icon and picture in it with rounded corners. And this is absolutely fine as rounded image in icon indicates that this is my latest version of this web app.:

If you take a look on icon detail, you can see this icon contains image with rounded corners, which indicates latest version of this web app:

So far, everything is fine. Then I try to open this web app from my iPad mini’s Home Screen, by tapping this icon and I get this:

And now, the most important part is: when I navigate back to Home Screen, I can see my web app icon has changed to my previous version of this web app, when picture inside icon was square (with sharp edges):

If you look closer, you can see that this icon’s image has changed from rounded edges to sharp square image. This indicates that my iPad somehow cached previous version of icon or web app, that I have tested before:

I can delete this icon, clear all Safari cache and web data and repeat whole process, rebooting (soft reset my iPad, reseting network settings…), but I can’t get rid of that old version icon from my iPad. If this has happened with my first web app, I am affraid what would happen if I ever make any serious web app that would require me to test it hundreds of times. Or even worse, what if I make an update to web app that has 100 users and let me say 10 of them are stuck with iOS cached previous version of my web app the same way I am?

So this is the main reason why I ask myself if I really want to work web apps or use Xojo. I still can’t say for sure who’s fault is this iOS’s or Xojo’s…

On Apple discussions forums someone is talking about some “manifest” (server side) file which tells when web app can be cached and when it is new version and needs to be reloaded, but I am not sure if this applies to cgi apps that Xojo exports, too.

Maks,

This actually works fine on iOS 6 running from a debug build. Just tested on my iPod Touch 4G. Any chance you can deploy as standalone rather than CGI?

Brad, I am not sure that I can deploy this web app as standalone because I use HostGator’s shared hosting. I also have one iMac as a web server, but I need to learn to configure it correctly both for cgi and for standalone. If you read my previous post more detailed, you can see this is rather iOS cache related issue. Icon changes from new to old after I open web app from Home Screen.

BTW Brad, I also know that this web app will work on any ios device from Home Screen, if you test it now. The problem starts if I change (update) my app and users that had previous version of my web app icon on their Home Screen, could be unable to readd the new updated web app icon to their Home Screen, due to iOS caching old web app and/or icon (and maybe some other cookie data too).

I am happy of any response from anyone, so thank you again Brad.

Maks, what happens if your run the app in the debugger, connect from your iPad, bookmark to homescreen, quit debug app, do something to update, run again from bookmark?

I ask because I do this all the time and don’t see your issue. Running locally from debug is just like running against stand-alone deployment.

Brad thank you. I will have to learn how to do that. Newby here, sorry. I am in bed now and will brb tomorow. Does it mean I can test Xojo web app on ipad without building cgi and uploading it to the server?

Yes, you can. Run it in debugger. App will open in browser on your dev machine. Find LAN address of your dev machine. Connect to it, port 8080 from iPad Safari, e,g. http://192.168.1.100:8080.

-Brad

Brad, this is wonderful!!!
I had to try it right away when I woke up! Thank you so much for this! Now Xojo web programming makes sense… I will try to add to home screen and make changes…

Brad, this works like a charm! And programming in Xojo for web makes sense only this way. I actually purchased Xojo to make iPad specific accounting web app, so you can understand you have saved me thousands of time consuming deployment processes, so I really thank you for this!

However, my initial issue remains intact…

I personally don’t need this test “Radio Brigita” web app on my iPad, I just care for my future web app users and what will happen to them if I update web app. I would like to make sure this “caching cage” happened to me only or I need to know a way to solve this issue by clearing ios7 Home Screen cache somehow.

So Maks, are you saying you get the same behavior running against the debug builds? I was hoping that you wouldn’t. If not, then I’d presume if you deployed stand-alone, you might avert the problem. I only deploy stand-alone and I have not seen a problem like this. Occasionally, a homescreen icon fails to launch (and that probably is a cache issue), but trying again makes it all right again. That’s my experience with stand-alone builds.

With CGI builds. your user might be waiting for the server to start the app, and things might be going badly there, especially on underpowered servers that take too long to load the app.

Another thing to try is upload this webapp in another directory on your server and see if you still get it to crash on ipad. Might want to make sure you give your app a new application identifier. But that would only tell you if it’s a caching issue on your home screen.

Thank you Rob, I have also tried this before by changing CGI file name, creating subdirectory with name nova, so I had completely new url.

But now I have good news!!! While I was opening 2 new projects on dev machine and connecting my iPad to http://192.168.1.160:8080 like Brad Hutchings suggested, the stupid cache has somehow gone away!

I deployed my new app at http://radio.brigita.info and everything works as I expected to work.
Thank you all, especially Brad Hutchings. Now I can stay with Xojo :slight_smile: … And yes I will consider deploying as stand alone as soon as I learn how to :))))).

THANK YOU!