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 8540157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:32:03+00:00 2026-06-11T11:32:03+00:00

I have my NodeJS and Socket.IO server running perfectly, however I notice that a

  • 0

I have my NodeJS and Socket.IO server running perfectly, however I notice that a socket disconnect and reconnect occurs every time I refresh the browswer page or navigate to a different page.

How do I make it so sockets persist between pages?


Thanks, I thought of that but wanted to avoid it as it’s quite a big change for the system I’m making and would be a fair bit of work.

The only thing the socket connects/disconnects will effect is a “users logged in” counter. But I think I can get around that with a setTimeout on the Node server, so if a socket disconnects and reconnects within 2 seconds, the counter won’t change. Is that the best work around in terms of this counter?

  • 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-11T11:32:04+00:00Added an answer on June 11, 2026 at 11:32 am

    You can’t really do that: network connections do not survive page navigation or refreshes. If you really really care you’ll basically need to build a single page application.

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

Sidebar

Related Questions

I have a NodeJS TCP socket server running and I'd like to add support
This is probably a simple mistake. I have a nodejs server running socket.io, I
Here's my problem: I have server A, running node.js and using socket.io for communicating
I have a windows server running IIS and node.js with socket.io for an interactive
I have a socket.io server running and a matching webpage with a socket.io.js client.
I have setup myself a NodeJS and socket.io server with the mysql node module
I am attempting to run Nodejs with the Socket.io module. I have installed the
I use node.js and socket.io. I have an application that runs on the IP
I have a nodejs script that uses phantomjs-node to scrape a webpage. It works
Let's say I have a nodejs/express application on production server. If I want to

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.