close current browser tab

I used the script

<script type = "text/javascript">

function closeWindow(){
window.open('','_self','');
window.close();
}

</script>

this works well with IE (it overrides prompt) and chrome but is not
working with Firefox as by default Firefox don't allow to close tab
using JavaScript
It is needed to follow these steps in Firefox
1. Go to address bar and type about:config
2. Go to parameter dom.allow_scripts_to_close_windows
3. Set its value as true

Comments

Popular posts from this blog

Rails Memcache issues

scp command usage guide

cucumber usage in rails project