Re:The Several Million Dollar Bug
by carsonreinke on Tuesday June 10, 2014 @04:11PM
(#7875020)
Unless you use subdomains to know what asset is being requested (style.css.example.com). Even a wildcard subdomain would work.
Informative!
Now that I think about it, one could use a small javascript library embedded in the index page to make a number of additional requests and interpret them as the correct types via data: URLs. That would be a lot of messy hacking to shave off a few hundred ms, but might be an interesting exercise to undertake...
If you get lucky it will work, but if you're unlucky then you'll be sending out the wrong payloads on all but the first request.
The only reason this trick worked for the webcam is because it knows ahead of time what kind of request will come (the request for the next frame). That's why it can anticipate.