Questions tagged [ajax-polling]

Ajax polling is a technique used for checking for new server-side events.

93 questions
1
vote
1 answer

Jquery Ajax Polling jumps to top on every call

I am using below function to display currently active gameList. Now the problem is that if a player is going through the list and if there executes the ajax call then it jumps to the top of div which I replace with the response from the ajax…
Mihir Patel
  • 230
  • 3
  • 22
1
vote
1 answer

Non-deterministic parsererror

I encountered some weird error by doing some short-polling ajax()-request to a play2.1-server. Currently I am using REST to send a request to the server and I await a json as answer. The server always response the correct JsonP but after a short…
1
vote
2 answers

Trying to call a function every 3 minutes using JavaScript

I have a function that returns an integer (the current reputation score for a user on a community site). That number is often going up or down based on how their comments and submissions are voted on. I'd like to "poll" it every 30 seconds or so…
bflora2
  • 723
  • 3
  • 8
  • 24
1
vote
3 answers

Online users in Ruby on Rails

What is the simplest way how to check if user is online and display list of online users? The only way I can think of is some periodic polling server to update last action timestamp, and when last timestamp is more than xx ago, user is considered to…
Jakub Arnold
  • 79,807
  • 86
  • 218
  • 314
1
vote
2 answers

Insertion of Ajax polling

I would like to know if its possible to insert Ajax polling into the current code I have below so the users posts update every ex amount of seconds to show any new content added to the database such as their statuses and the number of new comments…
dave
  • 957
  • 5
  • 14
  • 26
0
votes
1 answer

jQuery Mobile transitions and AJAX Polling on a MasterPage

I am trying to use AJAX polling with jQuery to update a span element on a razor MasterPage in ASP.NET MVC3. The page uses the jQuery Mobile 1.0 framework that adorns simple view changes (like navigating from /home to /about) with some sort of…
Shackles
  • 1,252
  • 1
  • 19
  • 39
0
votes
1 answer

How can I publish a message to all Javascript subscribers for a channel using CometD?

Given a Java web application using CometD, how can I publish a message to all of a channel's subscribers each time a message is processed by bayeux? For testing, I used serverSession.deliver(serverSession, "/test-channel", map, null);. The result is…
Matt
  • 3,194
  • 3
  • 21
  • 31
0
votes
0 answers

React Axios, checking on status of long API request

I need another way to approach this. I've got a React App that creates videos based on user input. These videos take anywhere from 1 to 10 minutes to generate. The creation of these videos is triggered by an axios api call The backend uses FFMPEG…
dtwoo
  • 301
  • 3
  • 12
0
votes
0 answers

How to implement polling in javascript

I want to get data from the server every one second. Suppose that I have data.json in the server. I want to fetch that file. Can I use the following code. function getData(){ fetch('./data.json') .then((result) => console.log(result)) …
0
votes
1 answer

AJAX Polling in an API for commercial use

Currently I'm developing an API that uses AJAX interval polling, it polls at 900bytes every 1.5 minutes, does not seem to put a heavy load on MySQL and is only one AJAX stream. I plan on upgrading to a node.js server once I get enough revenue from…
Trevor
  • 1,223
  • 6
  • 18
  • 31
0
votes
1 answer

RXJS Queue to accumulate data values every second and dispatch after every x seconds

I am trying to create a smart Queue that collects data every second or every time i call .next() and after every x secs, say x=5, it dispatches all the current items in the queue, while still receiving new items. The whole idea is to poll the http…
Chukwuma Nwaugha
  • 293
  • 5
  • 13
0
votes
1 answer

How to returned poll data after each nodejs api call to reactjs component

I need to poll the data until the response.Status === 'UpdatesComplete'. I have written this node js API function which basically polls the data - const getResults = async (location) => { try { const response = await poll(location); if…
Neha Gupta
  • 917
  • 3
  • 16
  • 32
0
votes
1 answer

Multiple response from server within a Ajax call in ASP.Net MVC 5

What will be the possible ways to send multiple responses to the client side within a Ajax call. Scenario 1.Import 200 records from excel through Ajax. 2.Read file record one by one. 3.On each iteration I need to send some data to client side and…
0
votes
0 answers

How to Stop Recursive Ajax Polling on Bootstrap Modal Close?

I am calling an ajax polling function when a particular bootstrap modal gets open, it works well, but when I close the BS Modal forcefully the polling function should stop, but it keeps on firing in the background. I don't know what I am doing…
Deepak Singh
  • 94
  • 12
0
votes
3 answers

AJAX Reload Interval (Polling) Assistance

I have several files I'm pulling minor text from (a single word most), and then stylizing that with another script. Currently they load and display as they should. However, the text files update at random times, so I'd like them to be reloaded, and…
Snarky_one
  • 13
  • 8