4

I have an server that delivers data that it processes over about 15 seconds. The headers are as follows:

Content-Type:text/plain; charset=utf-8
Transfer-Encoding:chunked

With telnet I can confirm that data is sent continuously over 15 seconds. In a browser the whole page hangs until the entire request is received, and then it renders all at once.

Occasionally on longer requests it hangs for a while and then starts streaming data to the screen as it arrives, but I have not deduced the threshold where that happens.

Is there some header or other magic I can send to make the browser render the content as soon as it is availible?

captncraig
  • 22,118
  • 17
  • 108
  • 151

1 Answers1

5

According to this related question you might be able to get it to work by using text/html as the content type (still need the charset=UTF-8 part too) or adding X-Content-Type-Options: nosniff to work around a webkit bug

Community
  • 1
  • 1
Greg Bray
  • 14,929
  • 12
  • 80
  • 104