View Full Version : Restart Sencha Touch Application

28 Aug 2011, 11:19 PM
I want to restart sencha application programmatically on button click.
Is there any way to do this?

29 Aug 2011, 5:02 AM
Yes you can but you have to do it manually... rerender what you needs.... reset things that you set throughout your app... or just redirect to the same url (not optimal)

29 Aug 2011, 11:12 PM
How i can restart sencha tuoch application through js code on button click.

13 Sep 2011, 4:23 AM

You can use
window.location.href = 'your starting page';

3 Apr 2012, 11:47 PM
or just redirect to the same url (not optimal)

This seems like the obvious solution - however on Safari/iOS5 when doing that the browser does not reload the page correctly.
I've tried to add some random string to the link to make it think it's a new url but it also didn't work - it seems that maybe the launch function doesn't run again. I also tried to add a 'no-cache' meta tag.

The redirect is done like this:

It would have been nice if there was a "restart" function

3 Sep 2013, 7:07 AM
Hello JJamid,

have you found a way to restart the app??

In my case, we add components on the fly, and that is causing some crashes (the loading mask does not disappear because a javascript error)

I would like to capture those errors and restart the app, is there any way to do that?