I have this code here:
<?php
error_reporting(0);
if(isset($_GET['bd'])){
?>
<script>
window.close();
</script>
<?php
}
Which is working okay in Chrome, but not working in FireFox. Is there a known issue with this? How can I get it to work consistently across the mentioned browsers?
In most browsers, window.close() will only work if the window in question has an opener.
By an opener, I mean that you have a parent window that opens a child window. Only the child window can be closed by a window.close().
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With