-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Streamer | Server] Link header + rel prefetch #96
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Abstract
Some clients e.g. Chrome (or Edge and Firefox, albeit in a different manner, and cURL, etc.) will abort if the response header to a request is too big.
Chrome, for instance, throws the following error:
ERR_RESPONSE_HEADERS_TOO_BIG
, while cURL will returncurl: (27) Avoided giant realloc for header (max is 102400)!
This may impact manifest requests if the list of resources is large and all are
rel=prefetch
e.g. fixed-layout EPUB file with a lot of fonts.Technical details
Let’s take a successful request first:
As you can see, the number of requests can escalate very quickly (1300+ of the total number of requests are font resources) so that may already slow down rendering, cf. the following waterfall.
When failing, you’ll get an error in Chrome, 0 bytes in Firefox, etc.
This is the corresponding waterfall
The limit I can find for Chrome is 256 K, cf. chromium source
But I’m not sure about other clients since I focused on browsers.
There should probably be a limit/best practice so that prefetch (via
Link
header) doesn’t put a burden on the client.cc @HadrienGardeur and @danielweck
The text was updated successfully, but these errors were encountered: