3

I want to just close or minimize (hide) full-screen iPhone web application.

How to do this? window.close(); doesn't work.

tshepang
  • 12,111
  • 21
  • 91
  • 136
noober
  • 4,819
  • 12
  • 49
  • 85
  • Yes you can.. There is something called 'close.js'. It's here on github and works really good. : https://github.com/eds1999/Close.js/ –  Jul 26 '13 at 11:58

2 Answers2

3

You can't. You cannot quit the browser from JavaScript.

But you could try to make the browser crash... not that this would be a good idea.

Zeno Popovici
  • 589
  • 3
  • 15
  • Not even in full-screen state. I know it's a limitation for full screen apps, but that's the way it is. Also keep in mind that almost all native apps are also quit via the hardware button. I think only one of the games I played had an exit button. – Zeno Popovici May 02 '12 at 18:25
  • Used to try being consistent with other platforms. The Birds (on Android) has at least quit confirmation and closing can be cancelled. My solution is to gray the quit button out and change its label to 'Click Home button instead' (for Mobile Safari only). – noober May 03 '12 at 09:43
0

I'm not really sure why you would want to do this, but you cannot.

dgund
  • 3,459
  • 4
  • 39
  • 64