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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:01:25+00:00 2026-05-16T11:01:25+00:00

What are some good practices for polling a server with JavaScript for an application

  • 0

What are some good practices for polling a server with JavaScript for
an application that needs to refresh data very rapidly? I’m using jQuery for front-end and Java Spring Framework for backend.

Example of refreshed data could be list of items that are getting updated very rapidly (every 1 second).

  • 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-16T11:01:25+00:00Added an answer on May 16, 2026 at 11:01 am

    You may want to use jQuery’s Ajax functions to poll the server every second or so. Then the server can respond with instructions to the browser in near real-time.

    You can also consider long polling instead of the above, to reduce the latency without increasing the frequency of the polls.

    Quoting Comet Daily: The Long-Polling Technique:

    The long-polling Comet technique is a technique that optimizes traditional polling to reduce latency.

    Traditional polling sends an XMLHttpRequest to the server in fixed intervals. For example, open a new XMLHttpRequest every 15 seconds, receive an immediate response, and close the connection.

    Long-polling sends a request to the server, but a response is not returned to the client until one is available. As soon as the connection is closed, either due to a response being received by the client or if a request times out, a new connection is initiated. The result is a significant reduction in latency because the server usually has a connection established when it is ready to return information to return to the client.

    In addition to the above, I also suggest that you check out the accepted answer to the following Stack Overflow post for a detailed description of the long polling technique:

    • How does facebook, gmail send the real time notification?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 516k
  • Answers 516k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can use StandardAnalyzer. I tested this, by adding the… May 16, 2026 at 6:45 pm
  • Editorial Team
    Editorial Team added an answer I'm assuming that sq is a Sequence... I've not worked… May 16, 2026 at 6:45 pm
  • Editorial Team
    Editorial Team added an answer You can extract the view function name thusly from django.test.client… May 16, 2026 at 6:45 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I'm currently polling my CFReadStream for new data with CFReadStreamHasBytesAvailable . (First, some background:
I realize that the phrase good practices is a bit dubious and overused, but
I could really use some good feedback on best practices / insight on whether
What's better practice when defining several methods that return the same shape of data
I recently inherited some code that someone else had written. I discovered that everywhere
I've got a class with some functions which realistically are just 'helper' methods that
So, I'm about to embark on a fairly lengthy, time consuming project that could
I have a parent object (part of a DAL) that contains, amongst other things,
Is there a good advisory / best practice manual etc. out there which outlines
We are running into unusually high memory usage issues. And I observed that many

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.