Hacker News new | ask | show | jobs
by NightMKoder 1404 days ago
They mention this in the doc, but it seems like the future solution to preloading resources will involve HTTP Status 403 [1]. That seems like a great alternative to server push.

Currently it seems like the best option is to use Transfer-Encoding: chunked and make sure you flush out an HTML header that includes the preload directives before you spend any time rendering the web page. This is a pain - especially if something in the rendering fails and you now have to figure out how to deliver...something to the client. It also limits other headers significantly - e.g. cookies.

[1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/103

2 comments

> solution to preloading resources will involve HTTP Status 403

“Access forbidden, here have this css file instead”

Or did you mean HTTP Status 103?

Lol yes of course I meant 103. Though I’m ready for an http status code that’s like that: “I can’t give you what you want, but here’s something you didn’t even ask for instead.”
In case anyone is confused, I believe the parent poster means 103, not 403.