TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Why HTTP Streaming?

84 点作者 ab9大约 14 年前

7 条评论

judofyr大约 14 年前
I've yet to see my concerns properly discussed (how to handle exceptions): <a href="http://news.ycombinator.com/item?id=1671437" rel="nofollow">http://news.ycombinator.com/item?id=1671437</a>
评论 #2461193 未加载
评论 #2460930 未加载
评论 #2461202 未加载
technomancy大约 14 年前
It's funny; some of the last work I did in Ruby was getting streaming support into Rack nearly three years ago. <a href="http://technomancy.us/109" rel="nofollow">http://technomancy.us/109</a> It's a shame to see it took so long to make it to Rails.
callmeed大约 14 年前
Besides asset fetching, do any browsers start <i>rendering</i> pages as chunks come in?<p>EDIT TO ADD: ok, so how does this work if you're page has js/jquery code executing on load? (say for js-based navigation and layouts) ... are people gonna see funky stuff before the page is fully loaded and the js is executed?
评论 #2459684 未加载
评论 #2460479 未加载
评论 #2459659 未加载
评论 #2459787 未加载
justincormack大约 14 年前
Has anyone tested how much of a performance benefit is this likely to give? It seems that it would benefit you most if you have a slow page composition layer but generate a lot of static includes like js and css. Arguably in that case you should be using ajax to retrieve the slower bits, or server side caching instead. But maybe i am missing a use case or some measurements that show it is more generally applicable.
Erwin大约 14 年前
Can anyone comment on omitting Content-Length in the response, versus using chunked encoding? Will chunked encoding simply give you more control over when the browser executes the content, or perhaps be more compatible with any proxies in between? Or is it just a matter of being able to reuse the connection afterwards, rather than having to close it?<p>Using a simple CGI script, both methods achieve the same and work in FF and Chrome - chunks sent have their script statements executed, so you can e.g update a progress bar as you render partial content. However, I had trouble getting it to work with gzip; I had to turn off gzip (SetEnv no-gzip in .htaccess) otherwise the whole output was sent at once (this has possible to do with some default compression buffer size setting).
guruz大约 14 年前
How did it work before with RoR? The whole response was buffered and then sent at once with a Content-Length header?<p>I wonder why "HTTP Streaming" (known since years as "Chunked Encoding") is such a big deal now.
评论 #2460946 未加载
评论 #2460494 未加载
warrenwilkinson大约 14 年前
Quick question: Is this suitable for streaming video? Just wondering, thanks.
评论 #2460396 未加载
评论 #2460671 未加载
评论 #2460998 未加载