Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

POST to PHP with server sent events?

Is it possible to use SSE to send POST data to PHP like in Ajax?

I've been using AJAX now for quite a while with bad results in long-polling technicues. I have also been thinking about WebSockets, but it seems a bit redundant.

like image 666
user1431627 Avatar asked Sep 14 '12 20:09

user1431627


1 Answers

No, SSE cannot send any data to the server.

You can still use SSE to read data in real time and use AJAX to upload any data (you might need a shared database to pass information between AJAX-receiving processes and SSE-sending one).

like image 51
Kornel Avatar answered Sep 20 '22 02:09

Kornel