Unlock instant, AI-driven research and patent intelligence for your innovation.

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.

Active Publication Date: 2018-06-15
FUJIAN NETDRAGON WEBSOFT
View PDF8 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] In the prior art, to solve the limitation of the cache size and time of the web browser, Cookie, localStorage or sessionStoreage is usually used, wherein the Cookie is generated by the web side, and the browser will save the key / value of the Cookie to a certain directory In the text file, the cookie will be sent to the server the next time the same website is requested. Since the browser limits the size of the cookie to 4K, this size cannot meet the current increasingly rich web applications. Later, in order to solve the shortage of cookie storage space The problem is that in HTML5, a new localStorage feature has been added. This feature is mainly used as local storage. In localStorage, the general browser supports a size of 5M. LocalStorage will be different in different browsers. Although localStorage expands the storage space to 5M, if you want to store more data, such as H5 games, 5M storage space is not enough and there are limitations; the only difference between sessionStorage and localStorage is that localStorage belongs to permanent storage, while sessionStorage belongs to when the session ends, the key-value pairs in sessionStorage will be cleared, therefore, Cookie, localStorage or sessionStoreage does not completely solve the browser's limitation on cache size and time, in addition, Cookie, localStorage and sessionStoreage cannot achieve cross- domain cache

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for accessing cached data of web end, and terminal
  • Method for accessing cached data of web end, and terminal

Examples

Experimental program
Comparison scheme
Effect test

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...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a method for accessing cached data of a web end, and a terminal. The method comprises the steps of receiving and storing the cached data of the web end to form a first cache file, and setting the first cache file to never expire; and receiving a request used for obtaining a second cache file and sent by the web end, judging whether the second cache file is stored or not, andif not, establishing a relationship with a second server storing the second cache file, receiving the second cache file sent by the second server, and sending the second cache file to the web end. Therefore, permanent caching and cross-domain access of the cached data of the web end are realized.

Description

technical field [0001] The invention relates to the technical field of computers, in particular to a method and a terminal for accessing cached data at a web end. Background technique [0002] In the prior art, to solve the limitation of the cache size and time of the web browser, Cookie, localStorage or sessionStoreage is usually used, wherein the Cookie is generated by the web side, and the browser will save the key / value of the Cookie to a certain directory In the text file, the cookie will be sent to the server the next time the same website is requested. Since the browser limits the size of the cookie to 4K, this size cannot meet the current increasingly rich web applications. Later, in order to solve the shortage of cookie storage space The problem is that in HTML5, a new localStorage feature has been added. This feature is mainly used as local storage. In localStorage, the general browser supports a size of 5M. LocalStorage will be different in different browsers. Al...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F17/30
CPCG06F16/21G06F16/955G06F16/9574
Inventor 刘德建陈铭王勤政高举全郭玉湖
Owner FUJIAN NETDRAGON WEBSOFT