Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Ce site disposera de fonctionnalités limitées pendant que nous effectuons des opérations de maintenance en vue de vous proposer un meilleur service. Si un article ne règle pas votre problème et que vous souhaitez poser une question, notre communauté d’assistance est prête à vous répondre via @FirefoxSupport sur Twitter, et /r/firefox sur Reddit.

Rechercher dans l’assistance

Évitez les escroqueries à l’assistance. Nous ne vous demanderons jamais d’appeler ou d’envoyer un SMS à un numéro de téléphone ou de partager des informations personnelles. Veuillez signaler toute activité suspecte en utilisant l’option « Signaler un abus ».

En savoir plus

Why do ports stay connected after I leave a website?

  • 5 réponses
  • 1 a ce problème
  • 9 vues
  • Dernière réponse par JohnCorliss

more options

I'm using the current version of Firefox in Windows XP SP3. For some time now, I've been using Nirsoft's "Currports", which displays the current connected ports, the program using them, the remote host name, etc. If a port has been disconnected and moved to a wait state, it also displays that.

What I've been noticing is that while using Firefox to surf the internet, when I leave a website, often the ports that website was using will remain connected! And I'm not talking about ports which change to a wait state. An example of such a website (and there are many) which does this is:

http://www.reuters.com/news/us

Even worse, a while ago I closed Firefox completely and when I looked at Currports, I noticed that FOUR ports, with Firefox listed as the program which was using them, were still connected! Yet when I looked in Sysinternal's "Process Explorer", Firefox wasn't listed as still running. I expected the ports to close shortly after I had initially viewed them, but 30 seconds later they were still open! I had to use Currports to close them.

When I leave a website, all port connections to that website should close for security reasons. I can't think of any good reason for ports to remain open and connected after I stop looking at a website.

Has anybody else noticed such things? And if this is a common occurrence, why does it happen? Why should a website remain connected to my computer after I leave it?

I'm using the current version of Firefox in Windows XP SP3. For some time now, I've been using Nirsoft's "Currports", which displays the current connected ports, the program using them, the remote host name, etc. If a port has been disconnected and moved to a wait state, it also displays that. What I've been noticing is that while using Firefox to surf the internet, when I leave a website, often the ports that website was using will remain connected! And I'm not talking about ports which change to a wait state. An example of such a website (and there are many) which does this is: http://www.reuters.com/news/us Even worse, a while ago I closed Firefox completely and when I looked at Currports, I noticed that FOUR ports, with Firefox listed as the program which was using them, were still connected! Yet when I looked in Sysinternal's "Process Explorer", Firefox wasn't listed as still running. I expected the ports to close shortly after I had initially viewed them, but 30 seconds later they were still open! I had to use Currports to close them. When I leave a website, all port connections to that website should close for security reasons. I can't think of any good reason for ports to remain open and connected after I stop looking at a website. Has anybody else noticed such things? And if this is a common occurrence, why does it happen? Why should a website remain connected to my computer after I leave it?

Toutes les réponses (5)

more options

Hi, Yes I have noticed that this happens in the Litbeam tool as well.

I did try to refresh the page, however some updated and others did not. There is another about:networking page that shows the open connected websockets. One way to disconnect from these are refreshing the list and seeing if they are active or not. The none active ones are just cached.

more options

guigs, thanks for replying. Not only can I use Currports to view connected ports, I can use that same program to disconnect them. You select the connected port or ports and then left click on the big red "X". Kills the connections immediately.

However, being able to do so doesn't remediate my concern that websites should disconnect ports (or at least put them in the time_wait state) immediately when I leave that same website.

more options

Well in negotiation there is a timeout that is set by the browser and by server if they do not hear from the other. That should resonate with the amount of time it takes for the connection to go away.

more options

I haven't studied the source code but I notice in about:config that some keep-alive parameters mention an idle time of 600 seconds, which is quite a long time. Presumably some or all of those connections would get closed sooner in favor of a new request, but perhaps only on an as needed basis and not based on closing a tab or leaving a page.

You can view those preferences using:

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button promising to be careful.

(2) In the search box above the list, type or paste alive and pause while the list is filtered

more options

jcher2000, those settings are definitely worth looking into. I've also been told that in Windows (I use XP SP3) there might be a registry setting which might be responsible.

Thanks very much for replying!