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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T21:15:27+00:00 2026-06-18T21:15:27+00:00

On my node.js server (running express and socket.io ), when a person connects, I

  • 0

On my node.js server (running express and socket.io), when a person connects, I add them to an array and save their location in the array into their session so each connection has access to their own information like so:

session.person_id = people.length;
session.save();
people.push(new Person());
//people[session.person_id] => Person

And the only thing that I save in the session is person_id. I have been using express.session() to handle this, which has been working fine until I started sending information to everyone who is connected at once. As I loop through their connections and get their sessions, sometimes (I can’t figure out how to dupe the error) session exists but not session.person_id.

Anyways I’m hoping that by changing how I store the session, it can help me figure out my problem. So I have a few questions that I can’t find answers to anywhere.

  1. Where is the cookie from express.cookieSession() stored? Server-side or client-side?
  2. Does express.cookieSession() allow for multiple servers running behind a load-balancer?
  3. Is it possible for a user to manipulate session data when using express.cookieSession()?
  • 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-18T21:15:28+00:00Added an answer on June 18, 2026 at 9:15 pm

    1 – Where is the cookie from express.cookieSession() stored? Server-side or client-side?

    The cookie is sent on the replies from the server, and the browser sends that cookie back with each request.

    2 – Does express.cookieSession() allow for multiple servers running behind a load-balancer?

    Yes, if you use a shared store (like RedisStore)

    3 – Is it possible for a user to manipulate session data when using express.cookieSession()?

    Not if you use signed cookies (the default for session cookies in express when you provide a secret when initializing the session.

    var redis = require('redis').createClient();
    app.use(express.session({
      secret: "some random string",
      store: new RedisStore({client: redis})
      }));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When someone connects to the node server, I keep an array with all the
I'm running a node.js express 3 server with no proxies and using SSL. I'm
I have a Express.js (v 2.5.8) (node v0.6.12) server running on port 3100. It
I've got a node.js express server running with the Jade template engine. I've got
I have a Node.js web server running on an embedded Linux system. For authentication
How to send messages from php to node.js? I have a linux server running
I have an Ubuntu server on linode running a node.js/mongo app. I realize I
when starting app.js I get $ node app.js info: socket.io started however, running index.html
I'm trying to build a simple Node app using Express, Socket.io, and the ntwitter
So far I have had a single node.js app. running socket.io. As number of

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.