Hacker News new | ask | show | jobs
by laundermaf 1380 days ago
I don’t find the HTTP headers approach useful. Headers only appear a few bytes before the HTML so if you keep the regular link tag right at the top of the file you’re good to go; no need to mess with headers.

Every HTML file should start with: doctype, html tag, head tag, charset meta tag, title, stylesheet link tag. A couple of those tags are even optional.

2 comments

The header approach is easier to graft on to an existing system where the entire html document is generated in one go. Otherwise you have to deal with generating the response in chunks which can be nontrivial.
Once HTTP 103 is better supported this will improve.
Only if there’s a gap between the 103 response and the head content arriving