We're calling on all EU-based Mozillians with iOS or iPadOS devices to help us monitor Apple’s new browser choice screens. Join the effort to hold Big Tech to account!

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Is there a programatic way (ie -remote) to close all tabs?

  • 1 个回答
  • 2 人有此问题
  • 2 次查看
  • 最后回复者为 Matt Brubeck

more options

Hi,

I'm refreshing a kiosk system that was built around a pre-tabbed browsing version of Mozilla, now using Firefox12.

The one step from the old system I'm having trouble reimplementing is returning the browser to the default state of one tab open to the home page after a period of inactivity.

The old version calls -remote openURL to reload the home page. Thanks to this forum (https://support.mozilla.org/en-US/questions/926745) I can open the home page in the active tab rather than opening a new tab every time, but I still need to close all other tab programitically, can this be done or does that require GUI interaction?

Hi, I'm refreshing a kiosk system that was built around a pre-tabbed browsing version of Mozilla, now using Firefox12. The one step from the old system I'm having trouble reimplementing is returning the browser to the default state of one tab open to the home page after a period of inactivity. The old version calls -remote openURL to reload the home page. Thanks to this forum (https://support.mozilla.org/en-US/questions/926745) I can open the home page in the active tab rather than opening a new tab every time, but I still need to close all other tab programitically, can this be done or does that require GUI interaction?

由jproulx于修改

所有回复 (1)

more options

I don't think there's a command-line way to close tabs or windows. You could either kill the Firefox process and start a new one, or you could write a simple Firefox add-on to do the work. An existing add-on like Reset Kiosk might help.