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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:23:00+00:00 2026-05-26T07:23:00+00:00

I am looking atways of implementing comet like behaviour for a website. So far

  • 0

I am looking atways of implementing comet like behaviour for a website. So far Node.js (and its various derivatives) seem to be ahead of the rest of the field (IMHO).

However, I can’t help noticing that with all of the client side JS that is responsible for updating the client (browser etc), the communication port is visibly hard coded in the client script.

To me (and I may be wrong), that is just like publishing which ports of your server are open (and therefore welcoming hackers to attack through that port). Am I being overly paranoid or is this really a cause for concern?

  • 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-05-26T07:23:00+00:00Added an answer on May 26, 2026 at 7:23 am

    I really want to say Comet isn’t any less secure, but that’s not quite true.

    First, the reason why it’s generally no less secure is that Comet requests are just like regular HTTP request, but with a slightly longer lifecycle. So they’re subject to the same requirements for proper security as any other HTTP endpoint you write (e.g. make sure you authenticate the user’s session cookie, etc.)

    But that long life cycle means it’s possible for the underlying user to change mid-stream through a Comet connection. This can make for some problematic user experiences. For example, imagine a chat application that uses Comet streaming to send messages to the browser, and uses regular HTTP polling to update the buddy list, showing which friends the user has online. Now examine this scenario …

    • Fred logs into your comet-based chat app in window A. You open a Comet connection (authenticated as Fred), and start pulling messages for him. Cool.
    • Now Fred minimizes the window and (thinking he’s closed everything) walks away
    • Sally comes along (not seeing Fred’s minimized window) and opens a 2nd window onto your site and logs herself in. This invalidates Fred’s session cookie, and replaces it with Sally’s.
    • Not too long afterwards, unseen by Sally, that first window polls the server to see which friends of the current user are online. Because the current user is now Sally, that first window updates to show all her friends.

    … now what does Sally see when she finds that first window? The friend list has updated to show all her friends, so it looks like she’s logged in there. But Comet connection was authenticated to Fred and is still open. So Sally is getting Fred’s messages, and not getting hers. Ewww.

    This is the sort of thing you need to watch out for rather than worrying about how visible your endpoint is. All http endpoints are visible, and can be easily reverse engineered using modern browser debuggers and network packet sniffers. Security comes from implementing sane authentication strategies on the server, not from hiding how you connect to the server.

    Finally, note that nothing in your question or this answer is specific to node.js. All Comet solutions have these same traits.

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

Sidebar

Related Questions

Having recently heard about Windowbuilder and its excellent graphical tools, I am looking atways
I've been looking at ways to implement gmail-like messaging inside a browser, and arrived
I'm looking for recommendations on best practices when implementing equality in a domain model.
So, I'm implementing a program with multiple threads (pthreads), and I am looking for
I like the Stack Overflow comment UI a great deal and I'm looking into
I am looking at ways of interfacing to specific hardware I/O addresses from various
I'm looking at ways of implementing a crawl delays inside of Scrapy spiders. I
I am looking at ways to embed videos in webpages. My website is coded
I have been reading about REST and SOAP, and understand why implementing REST can
Just looking at ways of getting named constants in python. class constant_list: (A_CONSTANT, B_CONSTANT,

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.