3 ms·
> Early hints solves a different problem I think it saves the same main problem which is to trigger assets download early. However you are right streaming the
by byroot 3y ago
> Early hints solves a different problem
I think it saves the same main problem which is to trigger assets download early.
However you are right streaming the response has a few extra advantages.
I still think getting most of the results with a tiny fraction of the effort is a better solution, but your mileage may vary.
- dmw_ng 3y agoWhat if the assets are a list of URLs computed incrementally? In my app's case, the specific JS bundle variant to load is itself a result of a database query. It's easy to see many scenarios where the majority of assets (e.g. say photos) aren't known prior to building the response body
- byroot 3y agoBut you can emit as many 103 as you want. So you can start by sending the statically known assets, and then emit an extra 103 each time you are at the stage where the other assets are known.