Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8732385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:25:49+00:00 2026-06-13T09:25:49+00:00

I made a simple app with SignalR for testing. When the page loads it

  • 0

I made a simple app with SignalR for testing. When the page loads it calls a function on the server, that function then calls a client function that prints a message on the screen. I did that to check that both the client and server function works and SignalR communication works ok.

My problem is that if I open the same page on two different tabs (did it in Chrome), the first page loads ok, but the second page doesn’t call the server’s functions – ONLY if I close the first page.

So as far as I understand, their is probably a connection limitation that is related to the browser that doesn’t allow SignalR to connect more then once (actually two, one for receiving and one for sending)

Update: I’ve find our that other tabs where open, but now I’ve checked it through and it allows only 4 tabs / pages to be active with connections. If I try to put the same page on a new tab no data is being sent, when I close one of the other tabs, the new tab sends the data right away.

What I wanted to know if there is any solution for that, because I want this connectivity to be available if the user decide to open the same page on two tabs or more.

I don’t believe that it has anything to do with IIS, because from what I know it can accept thousands of connections.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T09:25:49+00:00Added an answer on June 13, 2026 at 9:25 am

    This problem would be best addressed by the future Channel Messaging specification, which has not been implemented by any browsers to-date, but I managed to solve it by limiting the number of connections as described by Alex Ford and using localStorage as a message bus between tabs.

    The storage event lets you propagate data between tabs while keeping a single SignalR connection open (thereby preventing connection saturation). Calling localStorage.setItem('sharedKey', sharedData) will raise the storage event in all other tabs (not the caller):

    $(window).bind('storage', function (e) {
        var sharedData = localStorage.getItem('sharedKey');
        if (sharedData !== null)
            console.log(
                'A tab called localStorage.setItem("sharedData",'+sharedData+')'
            );
    });
    

    You can test if ($.connection.hub.state === 1) to determine if a given tab should notify the other tabs via localStorage (courtesy of Alex) to prevent duplicate localStorage.setItem calls.

    Facebook overcomes this browser limitation by serving persistent connections over several sub-domains, but this can complicate deployment and testing.

    Caveats

    Old Connections: In Alex’s solution, you need to be careful of Disconnect() not being called (e.g. exception), and you filling up your HubConnections bucket (or repository) with old hub connections. If the Session ID does not change (can happen), this may prevent new clients from establishing a SignalR connection even though none are active. Alternatively, timestamp new connections and have a sliding expiration to minimise potential impact.

    Locking: localStorage may be subject to race conditions as it does not implement any locking as described here.

    To support different types of events, you should encode an eventType in your JSON messages and test for it on the storage event.

    Fallbacks

    If a SignalR connection cannot be established, I fall back onto polling the server every 45 seconds to retrieve a notification count.

    If you don’t want to use localStorage, you can use cookies, but it’s not as clean.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I made a simple application, then submitted for review. After that the app details
I've made a simple app for the purpose of posting to a Facebook Page
Ok I have made a simple radio app that streams music from my university
I've made a very simple app that just displays a Google map. However, it
I made an exceedingly simple app consisting of a launch activity (.TestActivity) with nothing
From the Question above, I've made a simple windows app similar to MSN and
I've made a simple C# WinForms app, which makes a screen-capture using System; using
It's a simple app I've got and I'd like the button I've made to
I have made a simple web form in Google app engine where I have
I made a simple GPS. app. for android, storing the route coordinates into file.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.