0

I'm using Server Sent Events in my web application and have 2 persistent connections on every page for real time notifications from the server. I faced a problem where browsers limit concurrent connections to the same domain (e.g. FF limit is 6) so when user will open few pages, next connection will be queued by browser and the page will freeze.

This is killing all advantage of SSE vs simple polling.

Is there any workaround except make SSE connection via some subdomain to not freeze main domain connections?

Novarg
  • 253
  • 2
  • 17

1 Answers1

0

I've answered this question here.

That is due to the maximum number of connections of the browser to a single domain.

What you could do is collect all Deferred objects and cancel them when the use clicks on a link.

See answer for more details.

Community
  • 1
  • 1
R. Oosterholt
  • 7,720
  • 2
  • 53
  • 77
  • Thanks, but too much restrictions compared to running few subdomains only for notification. One of most important is that user can type url in new tab and none of deferred objects will be killed on other opened pages. – Novarg Feb 14 '14 at 13:41