开发者

chunked encoding: is there a way to stop the browser spinner before the last chunk?

开发者 https://www.devze.com 2023-02-18 06:36 出处:网络
i\'m using chunked encoding to send down an http response. i\'d like the browser spinner to go away (signal that the page开发者_如何学编程 is done loading) before the last chunk is sent down.

i'm using chunked encoding to send down an http response. i'd like the browser spinner to go away (signal that the page开发者_如何学编程 is done loading) before the last chunk is sent down.

is there any possible way to do this? the content of the next chunk doesn't seem to matter. i even tried sending a chunk that closes the body but the spinner keeps going after that. i tried this in all major browsers.

thanks!


What about using a Javascript (Ajax) request instead of chunked encoding?


Try connecting to your chunked-response URL using setTimeout:

  window.setTimeout(function () {
      doConnect();
  }, 0);
0

精彩评论

暂无评论...
验证码 换一张
取 消