Method for accessing cached data of web end, and terminal
A technology for caching data and terminals, applied in the computer field, can solve the problems of inability to realize cross-domain caching, insufficient use, insufficient cookie storage space, etc., and achieve the effect of realizing cross-domain access and permanent caching.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0062] A method for accessing web-side cached data, comprising steps:
[0063] S1. Receive and store the cached data on the web side to form a first cache file, and set the first cache file to never expire;
[0064] Step S1 specifically includes:
[0065] S11. Setting a file in a directory for storing cache;
[0066] S12. Modify the server configuration, and set the file to never expire;
[0067] S13. Receive the cached data on the web side, and write the cached data into the file;
[0068] Modify the server configuration and set the cache to never expire. When the web end requests to obtain the cache file for the first time, the web end will directly store the cache file locally. Unless the server updates the first cache file, subsequent requests will actually The above is obtained locally from the web side. The storage period of the cached files locally stored on the web side is agreed upon by the server and the web side. After the server receives the cached files from ot...
Embodiment 2
[0082] This embodiment describes how the above-mentioned method for accessing cached data at the web end of the present invention is implemented through a specific scenario:
[0083] Scenario 1: Get the same domain cache
[0084] 1. The user accesses the website address through the web terminal, such as the address: http: / / www.abc.com / a.html;
[0085] 2. a.html first loads the cache controller file http: / / www.abc.com / cacheControl.js
[0086] 3. cacheControl.js initiates a request to the server abc:
[0087] Operation: download the cache file cache.json;
[0088] Source server name: abc;
[0089] 4. After the server abc learns that the "source server name" is the same as the server name, the server abc judges whether this request is the first request on the web side. If not, it determines whether the file has expired according to the http protocol and the browser. If If the browser finds that the current file has expired, it will re-request the cache.json file, otherwise it...
Embodiment 3
[0123] A terminal 1 for accessing web-side cached data, including a memory 2, a processor 3, and a computer program stored in the memory 2 and operable on the processor 3, and the processor 3 implements Embodiment 1 when executing the program each step in the .
[0124] In summary, the method and terminal for accessing cached data at the web end provided by the present invention form a first cache file by receiving and storing the cached data at the web end, and set the first cache file to never expire. The request sent by the terminal to obtain the second cache file, judge whether the second cache file is stored, if not, establish contact with the second server storing the second cache file, and receive the second cache file sent by the second server Two cache files, and send the second cache file to the web end, realize the permanent cache and cross-domain access of the cache data on the web end, set a file under a directory for storing cache, and set by modifying the server...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 

