Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
xiphias2
· 1y ago · 0 comments
With HTTP streaming the browser shows that it's still loading data. Is there some mitigation for it after the initial loading?
Comments
[–]
bob1029
1y ago
The fetch API is asynchronous. The initial page load would deliver the payload that then initiates the streaming connection in the background.
[–]
lxgr
1y ago
That sounds less like a problem with HTTP streaming (initiated from JavaScript) and more like a page with some hanging resource.
[–]
panic
1y ago
I'm guessing you would use JS to fetch() the stream resource separately.
[–]
xiphias2
OP
1y ago
Sure, it would be just cool to not have to do that
[–]
paxys
1y ago
Not sure what you mean. How else are you going to make the request if
not
using fetch()?
[–]
bob1029
1y ago
You could use an iframe as well, with certain caveats.