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


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?

图片转代码服务由CSDN问答提供 功能建议


当我使用SSE(服务器端事件)和ajax查询时,我仅在服务器上具有事件响应的情况下才得到ajax响应。 不论SSE事件如何,都可以接收Ajax响应吗?     

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • csdnceshi62
    csdnceshi62 2019-04-20 21:13

    I found a solution to my problem on the site:


    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.

    点赞 评论