Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
xiphias2
5 months ago
|
parent
|
context
|
favorite
| on:
You might not need WebSockets
With HTTP streaming the browser shows that it's still loading data. Is there some mitigation for it after the initial loading?
bob1029
5 months ago
|
next
[–]
The fetch API is asynchronous. The initial page load would deliver the payload that then initiates the streaming connection in the background.
lxgr
5 months ago
|
prev
|
next
[–]
That sounds less like a problem with HTTP streaming (initiated from JavaScript) and more like a page with some hanging resource.
panic
5 months ago
|
prev
[–]
I'm guessing you would use JS to fetch() the stream resource separately.
xiphias2
5 months ago
|
parent
[–]
Sure, it would be just cool to not have to do that
paxys
5 months ago
|
root
|
parent
|
next
[–]
Not sure what you mean. How else are you going to make the request if
not
using fetch()?
bob1029
5 months ago
|
root
|
parent
|
prev
[–]
You could use an iframe as well, with certain caveats.
Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: