weixin_33696106 2019-04-20 14:59 采纳率: 0%
浏览 59

如何将SSE与AJAX分开?

when I use SSE (Server-Side Events) and ajax queries, I get ajax response only with the response of the event on the server. Is it possible to receive ajax responses regardless of SSE events?

  • 写回答

1条回答 默认 最新

  • csdnceshi62 2019-04-20 21:13
    关注

    I found a solution to my problem on the site:

    https://developer.hyvor.com/php/ajax-long-polling

    specifically, it is:

    Session data can't be used in long polling. If you do, it will completely freeze the browser tab. Other requests sent to the same domain won't load. Adding session_write_close() function at the top of the script can cancel the usage of sessions in the script.

    评论

报告相同问题?