2 ms·
I don't know, these seem like optimizations in the wrong places. 1. Headers aren't always the same for every request. Etags and other cache headers, content-ty
by tlrobinson 18y ago
I don't know, these seem like optimizations in the wrong places.
1. Headers aren't always the same for every request. Etags and other cache headers, content-types, etc can/will all be different. They're also comparatively small to most content. And of course you can control which headers you send, so if it's really a problem just send the bare minimum.
edit: I'm talking about the response headers, reading that again it looks like you're talking about the request. In that case you're probably right, there's a lot of duplication, especially user agent and cookies.
2. You don't know every resource you're going to request up front: you download whateverpage.html, decode and parse it, then make all the requests for scripts, images, stylesheets etc. I don't see this working very well.