为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

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

详细了解

How close network connections when Firefox or tab closed

  • 5 个回答
  • 1 人有此问题
  • 15 次查看
  • 最后回复者为 cor-el

more options

Firefox goes to a website. I use netstat at a command prompt and see a number of open connections for that website. I close Firefox and wait 10 seconds. I then run netstat again and the network connections for the website are still open. How do I configure Firefox to close network connections when I close the tab or when I exit Firefox?

Thank you,

Stan

Firefox goes to a website. I use netstat at a command prompt and see a number of open connections for that website. I close Firefox and wait 10 seconds. I then run netstat again and the network connections for the website are still open. How do I configure Firefox to close network connections when I close the tab or when I exit Firefox? Thank you, Stan

所有回复 (5)

more options

Well.. I am using Windows 10. I see the PID process for Firefox is gone and not running when I close it. The network connections still show up in NETSTAT and they are now associated with PID 0 - 'System Idle Process'. Does Firefox have a setting to tell Windows not to wait and close the network connections immediately?

more options

Hi Stan, could you check whether the website create a service worker to connect in the background? There is an internal page you can open using the address about:serviceworkers (paste that in the address bar and press Enter to load it). If you find it there, you can unregister it.

(I don't know whether there is a way to automatically unregister service workers when you close a site, if that is what needs to happen.)

more options

Interesting but there are no 'serviceworkers' registered. I vaguely remember that at one time Firefox had an option in this regard - something like 'close all running processes on exit'. One would hope that the network connections would close too but this may be more of an issue with the way Windows works. I find it very odd that the network connections would still be listed in 'netstat -ano' even when the process (Firefox) has closed/terminated.

more options

Oh, I misunderstood, I thought you were closing one site but not the entire browser. Service workers should not run if all instances of firefox.exe have terminated. Could you also check the Windows 10 Task Manager, Details tab, and confirm that there are no more firefox.exe processes running there 60 seconds after shutdown?

more options

Use one of these to close Firefox if you are currently doing that by clicking the close X on the Firefox Title bar.

  • "3-bar" menu button -> Exit (Power button)
  • Windows: File -> Exit
  • Mac: Firefox -> Quit Firefox
  • Linux: File -> Quit