1

I'm programming a web clip app which you can add to your home screen via Safari, and every time I open it, it reloads to the page which the web clip was saved in. How can I make the web app open where it last left off?

RiaD
  • 46,822
  • 11
  • 79
  • 123

1 Answers1

1

It must reload the page unless the broswer or the app task hasn't been killed. In order to make the app restart from where it left off, you need to perserve the page state and load it with javascript and html5. Here's an example where you click on a tab/menu of the page, it will be re-opened http://dotaprj.me/ restarted (close the page then reopen it)

Also, by web clip, if you mean HTML5 video, then you can save where the user is at in the timeframe and load it back with javascript.

Hamed Al-Khabaz
  • 680
  • 4
  • 7
  • Yeah, but this doesn't work in my case as my problem is that my page takes a while to load, so i don't wan t to reload it. –  Jan 10 '13 at 23:08
  • @SolèneLeVan np, you need to realize that although your page takes long to be loaded, you can't open where they left off with out knowing their state. The only way you can do that is when the end user doesn't close (kill task) his browser or his web app. You can't emulate that, and no other apps have ever done that. – Hamed Al-Khabaz Jan 10 '13 at 23:11
  • ok thanks anyways. :) It's about 8 seconds load time, which isn't horrible, but long enough to be of worry. This is the link: http://www.dumbsearch.com/now . I know you can do this in native apps... But so your saying it's not possible if the user hits the home button, right? –  Jan 10 '13 at 23:12
  • 1
    8 seconds is a lot, user experience teaches us that after 1.2 seconds of loading, 38% of users will leave. Consider prefetching or preloading your dynamic content si possible – Hamed Al-Khabaz Jan 10 '13 at 23:15
  • yeah did you see the url? http://www.dumbsearch.com/now that's the URL where i'm developing it at... you can see it live... I hope it isn't too long... (note that my main page for desktop computers doesn't load that slow, it's where isn't advertising this web app, but the web app loads slow) A lot of PHP! –  Jan 10 '13 at 23:17
  • 1
    Well I'm giving you the bounty... :) –  Jan 11 '13 at 01:12
  • They say that I have to award the bounty in 4 hours so I will do that. –  Jan 11 '13 at 18:44