How to “stream” json from server to client using javascript

前端 未结 4 1716
旧时难觅i
旧时难觅i 2021-01-05 00:20

I\'m familiar enough with Ajax and JSON that I can send a request and get a parse a JSON request. Ideally I\'d like to receive multiple response to periodically update a pro

4条回答
  •  温柔的废话
    2021-01-05 01:01

    JSON is just yet another format of data going over the HTTP protocol (like text, html, pdf, etc). You are probably referring to cometd.

    This allows you to open a persistent connection and push data from the server to the client (ie stream it). Any format is valid to push, the client just needs to understand it.

提交回复
热议问题