摘要 |
<p>Disclosed are an offline caching method and apparatus. The method comprises: capturing a resource downloading request, and obtaining, from the resource downloading request, an identifier of a resource to be downloaded; determining whether a resource corresponding to the identifier is stored in a local database according to the identifier; when the resource corresponding to the identifier is stored in the local database, encapsulating the resource corresponding to the identifier, and responding to the resource downloading request. By means of technical solutions of the present invention, a large quantity of network traffic may be saved. In a case where there is a network, and in particular, the network environment is good, a required resource may be downloaded and stored into the local database, and request time can be greatly reduced. Moreover, in a case where the network environment is bad, a required resource may be obtained from the local database, and a resource stored in the local database may be prevented from being repetitively downloaded, thereby improving the performance of a user terminal.</p> |