How to display HTML to the browser incrementally over a long period of time?

前端 未结 8 745
生来不讨喜
生来不讨喜 2020-12-05 11:58

Do I need to pass back any HTTP headers to tell the browser that my server won\'t be immediately closing the connection and to display as the HTML is received? Is there anyt

8条回答
  •  一整个雨季
    2020-12-05 12:10

    I think a more robust solution is a page with a Javascript timer that polls the server for new data. Keeping the response open is not something the HTTP protocol was designed for.

提交回复
热议问题