Large files

This page writes a large PDF itself (large-pdf.js: a page per image, about 150 KB each), then shows it in one of two ways over a simulated network, and measures the time to the first page and the bytes fetched by then. Nothing is downloaded or uploaded.

Results

WayFirst pageFetched by thenRequests

By ranges: content.linearizationInfo (as in Adobe's PDF Embed API) hands the viewer the bytes it asks for. Whole: content.promise resolves with the whole file once it has "arrived". With ?url=/path/file.pdf (a PDF of this site), the page uses content.location instead, with real range requests (add &ranges=0 to turn them off).