Mobile Client Closing

Hi,
I have a mixed project with desktop and mobile pages.
The problem I’m having is when I call system.util.exit() from a button on the mobile app I get an generic error page saying “Connection Reset”

Is there a better way to close a mobile client which just closes the whole web app?

Thanks