Confused about Server-Sent Events

I have a page sse.php that read data and send it back to client.

It works well except it starting over every N seconds.

I understand that EventSource reconnecting every N seconds
and my php script is started over again and again.

How do i determine what connection is the first one and what are just a maintaining reconnection?

Then i would know on what connection to run the reading script and on what not.

On WebSockets i know it is connecting only once then i only send data.

How to acquire the same with SSE?

Leave a Reply

*

Hire Me
Follow Me!
Search
Most Popular Articles & Pages
Because your vote is Important
Sorry, there are no polls available at the moment.
Categories