"Built-in" Chat using WordPress comments and WP API could use Server-Sent Events instead
Closed this issue · 0 comments
fabacab commented
Right now, the default chat system uses the WordPress commenting system to implement the incident chat functionality refreshed through traditional polling. Instead, let's use HTML5 Server-Sent Events (spec) to reduce the HTTP overhead since we are actually only communicating in one direction at a time (receiving/server-to-client on the chat template, and sending/client-to-server on the chat form part).
Note that Microsoft browsers still don't support EventSource
, so we'll need to fall back to the current polling mechanism if we are running on Internet Explorer or Edge.