X
Tap here to go to the mobile version of the site.

Support Forum

Close a firefox tab programmatically

Posted

I'm a web developer and I want to close a firefox tab programmatically with javascript...normally window.close(); should do the trick however with new versions of firefox the code just don't work and I searched a lot among forums and I couldn't find the proper answer...since this is the official site of mozilla firefox I taught maybe I could find an answer here... So how can I close a firefox tab programmatically? thanks

I'm a web developer and I want to close a firefox tab programmatically with javascript...normally window.close(); should do the trick however with new versions of firefox the code just don't work and I searched a lot among forums and I couldn't find the proper answer...since this is the official site of mozilla firefox I taught maybe I could find an answer here... So how can I close a firefox tab programmatically? thanks

Additional System Details

Installed Plug-ins

  • Shockwave Flash 15.0 r0
  • The plugin allows you to have a better experience with Microsoft SharePoint
  • The plugin allows you to have a better experience with Microsoft Lync
  • A plugin to detect whether the Adobe Application Manager is installed on this machine.
  • 5.1.10411.0
  • Adobe PDF Plug-In For Firefox and Netscape

Application

  • User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0

More Information

the-edmeister
  • Top 25 Contributor
  • Moderator
5395 solutions 40083 answers

If your code is opening that window, you should be able to close it via window.close(); If it is a window that you didn't open it isn't going to work.

If your code is opening that window, you should be able to close it via ''window.close();'' If it is a window that you didn't open it isn't going to work.