I have a page that immediately starts streaming events upon load, via an EventSource. To speed up the start of that stream, I'd like to use HTTP preload meta tags. But when I add this to my page:  <link rel="preload" as="fetch"...
I am attempting to use EventSource to create a live connection chat 1 to 1. I have my event source set up and from what developer tools is telling me, it is open and working however the response data is not being displayed from the PHP file.   PHP:...
How can I catch the http status code of a failed EventSource connection?  function onError(event) {   console.log('request status code?'); }  const source = new EventSource('url', { withCredentials: true }); source.addEventListener(&#...
My script reads EventSource, and on a message it will get some line data from a variable. That variable will be a array, my script breaks the array down and for each point it flips the x with the y value. It then sends each point as a post request. I...
I have some kind of problem when starting in PhpStorm debugging application.   When I access URL where I debug my application there is additional event source request (SSE) made for notifications system. But when debugging is working it causes a prob...
Is it possible to set the Last-Event-Id header of an EventSource ? I have a simple chat app that keeps the messages cached. When I connect, I send all the chat since the Last-Event-Id, or all of them if it is not provided.  Since I keep the messages,...
Client side looks like this:  var es = new EventSource("http://localhost:8080"); es.addEventListener("message", function(e) {     alert("e.data") //Alerts "" every couple seconds }) es.addEventListener("error",...
I'm using this code to send an SSE message to the browser client.  https://nodejs.org/api/http.html#http_response_write_chunk_encoding_callback  Node server      response.writeHead(200, {  'Content-Type': 'text/event-stream', '...
I have setup a http server to send data in intervals of 20 seconds.  The data starts at 101 and this number is incremented every time.  So the sequence of numbers will be 101,102,103, etc  I also append to the data, after a ; delimiter, the timestamp...
I'm looking to update a list of orders (and statuses) real-time on a webpage. The orders in the (MySQL) database are updated asynchronously through other processes (PHP).  I'm familiar with the mechanics of pushing data to pages (polling, eve...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.