Open Bug 879002 Opened 7 years ago Updated 2 years ago

Ability to toggle keepalive


(DevTools :: General, enhancement)

Not set


(Not tracked)



(Reporter: chrcoluk, Unassigned)



(1 file)

Firefox has no ability to disable keepalive, this breaches RFC, makes web development harder, makes diagnosing web site problems harder, plus every browser with the exception of chrome (which is an unusual browser) allows this to be toggled, it was removed in a previous version offirefox without a real logical reason.

It also can cause resource issues with many connections left open that do not get closed properly, as there is bugs in both server software and firefox software that cause problems with keepalive.  These issues are mostly prevelant on windows operating systems and I note the previous submitter who submitted the patch (which got applied rather quickly carelessly) was on linux.

I attach patch to add functionality.
there is no breach of an RFC we support.

The internet needs keep-alive to scale so firefox will always try and negotiate it. Servers are welcome to decline and we honor that. The pref you are talking about is whether or not firefox negotiates keep-alive.
Closed: 7 years ago
Resolution: --- → WONTFIX
(In reply to Chris from comment #0)
> makes web development harder, makes diagnosing web site problems harder

Please file a separate bug in the Firefox / Developer Tools component explaining why this is valuable. I can see how it might be useful to improve the developer tools to make it easier to debug connection-related stuff.

> It also can cause resource issues with many connections left open that do
> not get closed properly, as there is bugs in both server software and
> firefox software that cause problems with keepalive.

Which Firefox bugs are you talking about? Which server-side bugs are you talking about? This pref isn't the way to "fix" those problems, but it is useful to know what problems you are having so that we can prioritize good fixes for those problems.
As suggested, I'm moving this to Firefox / Developer Tools.

I am debugging an issue which, after a very long session with Wireshark, appears to be caused by our server responding incorrectly to POST request with Connection: close. These requests originate from nginx, which acts as a reverse proxy, even when the incoming connection is keep-alive.

So, purely as a developer tool, being able to force Connection: close would be useful in this situation.
Component: Networking: HTTP → Developer Tools
Ever confirmed: true
OS: Windows 7 → All
Product: Core → Firefox
Hardware: x86_64 → All
Resolution: WONTFIX → ---
Target Milestone: mozilla22 → ---
Version: 21 Branch → Trunk
It looks like this might be a good candidate for a command since it's something of a marginal feature:
I want keep-alive added back into firefox. The preference can be defaulted to keep-alive true for those that think it is important.
Not having keep-alive DOES NOT "break the web", I invite Patrick McManus to get bent! Your pants are on fire.
I advise otherse aside from Patrick who I believe has an alterior motive for this change to please visit
For those of use who care not only about system resource utilization but PRIVACY this is a BIG ISSUE!!!
To all the other developers of Mozilla THANK YOU for your wonderfull work.
Please reconsider this errant change in Firefox's behavior.
It was such a bad idea to eliminate the keep-alive toggle, please put it back!  After the Heartbleed bug, some big players including CloudFlare have recompiled their SSL support with option OPENSSL_NO_HEARTBEATS.  The lack of heartbeat support implies that a persistent https connection originating from behind a NAT (a very common case nowadays) may become stuck after a short idle time, because the NAT device will remove it from the internal tables due to apparent inactivity.  This has the very annoying consequence that the browser will insist in using a persistent https connection that is in fact broken at NAT.  The only solution in this case is to disable persistent connections (as I could indeed verify with an older Firefox).  Without the keep-alive toggle, this seems impossible to achieve.
agreed, but sadly I think they wont revert, it looks like it was changed for political reasons.
I too think "they" won't revert, but now at least "they" know more about this. Yesterday I compiled from source, disabling persistent connection once for all from within the source, and now I have a slower browser that always works.  I guess this will be bad for the Internet as "they" told ;) With a toggle I could at least choose when to disable and when to keep enabled.

If you have a patch for restoring the toggle, it would be welcome!
Just now I wanted to disable keep-alive to debug a websocket upgrade handshake, only to find out the pref got removed.. please readd!
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.