Sadin
Sadin

Reputation: 33

Android: Browser close "window"

I wrote a simple WebUI for Android/iPhone where users have an account with logout function. They usually start the application via a bookmark on their homescreen.

I want to give them a handy button to close the web browser/page once the logged out.

Whit the following script, the browser prevents the action

<script>
    window.close();
</script>

Is there a workaround that specially works on Android (default browser)?

Used tools/techniques

Upvotes: 2

Views: 3297

Answers (1)

Terje Nyg&#229;rd
Terje Nyg&#229;rd

Reputation: 1257

If I understand your question correctly, you want to use script to close the browser window itself? If so, you should read about this:

http://www.javascript-coder.com/window-popup/javascript-window-close.phtml

You'll meet some security restrictions with the close() function call.

Upvotes: 2

Related Questions