1. A computer program product for distributing content to a web browser, the computer program product being embodied in a non-transitory computer readable storage medium and comprising computer instructions for: detecting in a file that the web browser is directed by the file to request one or more resources to be downloaded to the web browser, wherein the file is requested by the web browser to be sent to the web browser; determining a network latency associated with the downloading of the one or more resources; and in the event that the determined network latency associated with the downloading of the one or more resources is above a predetermined threshold: selectively packaging a subset of the one or more resources that the web browser is directed by the file to download; and sending in advance the selectively packaged subset of the one or more resources to a device on which the web browser runs without receiving one or more requests for the one or more resources.