1. A method performed by data processing apparatus, the method comprising: requesting, by a client device and over a network, a resource of a document from a first source; before receiving the requested resource, requesting, by the client device and over the network, metadata for the document from a second source that is different from the first source; receiving, by the client device, the requested metadata for the document from the second source, wherein the received metadata comprises data indicating characteristics of layout or formatting of the document; receiving, by the client device, the requested resource of the document from the first source; providing, for display and by the client device, a first representation of the document based on the received metadata from the second source; and after providing, for display, the first representation of the document based on the metadata from the second source: generating, by the client device, a second representation that combines portions of the first representation with additional portions of the document; and providing, for display and by the client device, the second representation that combines portions of the first representation with the additional portions of the document.
1. A method performed by data processing apparatus, the method comprising: requesting, by a client device and over a network, a resource of a document from a first source; before receiving the requested resource, requesting, by the client device and over the network, metadata for the document from a second source that is different from the first source; receiving, by the client device, the requested metadata for the document from the second source, wherein the received metadata comprises data indicating characteristics of layout or formatting of the document; receiving, by the client device, the requested resource of the document from the first source; providing, for display and by the client device, a first representation of the document based on the received metadata from the second source; and after providing, for display, the first representation of the document based on the metadata from the second source: generating, by the client device, a second representation that combines portions of the first representation with additional portions of the document; and providing, for display and by the client device, the second representation that combines portions of the first representation with the additional portions of the document. 11. The method of claim 1 , wherein receiving the requested metadata for the document from the second source comprises receiving data indicating a location of a fold of the document; and wherein the method further comprises: based on the data indicating the location of the fold of the document, identifying content for display in an above-the-fold region of the document; and prioritizing processing of the content of the document such that the identified content for display in the above-the-fold region is processed before processing content for display outside the above-the-fold region.