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. 3. The method of claim 1 , wherein providing, for display, the first representation of the document based on the received metadata from the second source comprises: providing a first representation of the document that includes a displayable element indicated from the received resource of the document at a position and size indicated by the metadata received from the second source.