1. A method of distributing content to a web browser from a edge server, comprising: detecting by the edge server in a file that the web browser is directed by the requested 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 from the edge server; determining by the edge server a network latency associated with the downloading of the one or more resources; selectively packaging by the edge server a subset of the one or more resources that the web browser is directed by the requested file to download based at least in part on the network latency between the edge server and the web browser, comprising packaging a larger subset of the one or more resources for a higher network latency, wherein the network latency is determined based at least in part on a type of connection between the edge server and the web browser; and sending in advance by the edge server 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.