How To Close a Browser Tab With JavaScript




In this tutorial, you’ll learn how to close a browser tab (or whole window) with JavaScript. Found this helpful? You can always buy me a coffee to support the channel: https://buymeacoffee.com/jdcentral ☕

We saw in a previous JavaScript HowTo tutorial, that you can open a new tab in JavaScript using a special JavaScript window function.

In the tutorial, you’ll see that you can actually close this window too but only under special circumstances – you can’t just close any window you like.

Original source