Why do server-sent events initiate every 3 seconds? [duplicate]
问题 This question already has answers here : Setting time interval in HTML5 server sent events (4 answers) Closed 2 years ago . I am new to server-sent events, so I am trying this W3Schools example on WAMP Server. The files I have are: demo_sse.php <?php header('Content-Type: text/event-stream'); header('Cache-Control: no-cache'); $time = date('r'); echo "data: The server time is: {$time}\n\n"; flush(); ?> index.php <!DOCTYPE html> <html> <body> <h1>Getting server updates</h1> <div id="result"><