CN107644038A - Page cache method and device - Google Patents
Page cache method and device Download PDFInfo
- Publication number
- CN107644038A CN107644038A CN201610581496.5A CN201610581496A CN107644038A CN 107644038 A CN107644038 A CN 107644038A CN 201610581496 A CN201610581496 A CN 201610581496A CN 107644038 A CN107644038 A CN 107644038A
- Authority
- CN
- China
- Prior art keywords
- page
- file
- cache
- need
- cached
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a kind of page cache method, this method includes:The page of loading is needed according to corresponding to the page of input loads instruction acquisition;The configuration information of the page is obtained, the file that whether includes in the content of the page and need to cache is detected according to the configuration information of the page;If detecting in the content of the page comprising the file that need to cache, download it is described need cache file to be cached, and load the page.The invention also discloses a kind of page cache device.The present invention realizes the individual cultivation that file cache whether is carried out to the page, so as to reduce occupancy of the cache file being of little use in the page to system resource, improves running efficiency of system, optimizes Consumer's Experience.
Description
Technical field
The present invention relates to Internet technical field, more particularly to a kind of page cache method and device.
Background technology
When user browses webpage or APP (Application, application software) page, picture, video in the page,
The files such as audio would generally consume substantial amounts of flow, in order to reduce flow consumption, it will usually which the files such as the picture in the page are entered
Row caching, makes user be again turned on the file that the identical page caches without repeated downloads, directly can be called from caching.
The space that the files such as picture, audio, video take is larger so that the file of caching typically takes up substantial amounts of system
Resource.At present, after the caching function of the files such as picture is opened, all files in whole pages are typically cached.Therefore, part
File in the page being of little use can be also buffered, and cause the waste of system resource.
The content of the invention
It is a primary object of the present invention to provide a kind of page cache method and device, it is intended to solve cache file and excessively account for
With the technical problem of system resource.
To achieve the above object, the present invention provides a kind of page cache method, and the page cache method includes following step
Suddenly:
The page of loading is needed according to corresponding to the page of input loads instruction acquisition;
Obtain the configuration information of the page, detected according to the configuration information of the page in the content of the page whether
Include the file that need to be cached;
If detecting in the content of the page comprising the file that need to cache, downloading described needs cache file to be delayed
Deposit, and load the page.
In one embodiment, the configuration information of the page includes the interface configuration information of each module in the page,
It is described to detect that the step of whether including the file that cached in the content of the page wraps according to the configuration information of the page
Include:
According to the interface configuration information of each module, detect whether each module needs cache file respectively;
If detecting needs the module of cache file, judge in the content of the page comprising the file that need to be cached.
In one embodiment, the step of configuration information of the acquisition page includes:
Inquiry request is sent to server, obtains the configuration information for the page that the server returns.
In one embodiment, if comprising the file that need to be cached in the content for detecting the page, institute is downloaded
Stating needs cache file to be cached, and includes the step of load the page:
If detecting in the content of the page comprising the file that need to cache, being searched in local cache described needs to cache
File;
If not finding the file that need to be cached in local cache, download it is described need cache file to be cached,
And load the page.
In one embodiment, it is described searched in local cache it is described need to cache file the step of after, in addition to:
If successful search adjusts back the file that need to be cached and carries out institute to the file that need to be cached in local cache
Loading is stated, and loads the page.
In addition, to achieve the above object, the present invention also provides a kind of page cache device, the page cache device bag
Include:
Instruction module, for needing the page of loading according to corresponding to the loading instruction acquisition of the page of input;
Detection module, for obtaining the configuration information of the page, the page is detected according to the configuration information of the page
Whether the file that need to cache is included in the content in face;
Load-on module, if comprising the file that need to be cached in content for detecting the page, download it is described need to be slow
Deposit file to be cached, and load the page.
In one embodiment, the configuration information of the page includes the interface configuration information of each module in the page,
The detection module is additionally operable to,
According to the interface configuration information of each module, detect whether each module needs cache file respectively;If inspection
Measuring needs the module of cache file, then judges in the content of the page comprising the file that need to be cached.
In one embodiment, the detection module is additionally operable to,
Inquiry request is sent to server, obtains the configuration information for the page that the server returns.
In one embodiment, the load-on module is additionally operable to,
If detecting in the content of the page comprising the file that need to cache, being searched in local cache described needs to cache
File;If not finding the file that need to be cached in local cache, download it is described need cache file to be cached, and
Load the page.
In one embodiment, the load-on module is additionally operable to,
If successful search adjusts back the file that need to be cached and carries out institute to the file that need to be cached in local cache
Loading is stated, and loads the page.
A kind of page cache method and device proposed by the present invention, when the page for receiving user's input loads instruction, root
Being loaded according to the page needs the page of loading corresponding to instruction acquisition;Then, obtaining this needs the configuration information of loading page, for examining
Surveying this needs whether loading page needs cache file;Then, the configuration information of loading page is needed to detect this need according to this
Whether the file that need to cache is included in the content of loading page;If detecting that this needs to include in the content of loading page needs
The file of caching, then the file that downloading to cache is cached, and loading page.The present invention is only in detecting and needing loading page
When including the file that need to be cached, the file that can just download to cache is cached, and is realized and whether is carried out file to the page and delay
The individual cultivation deposited so that user either research staff can the page as needed attribute, flexible configuration page properties,
The file cache being of little use in the page is reduced, so as to reduce the occupancy to system resource, improves running efficiency of system, is optimized
Consumer's Experience.
Brief description of the drawings
Fig. 1 is the schematic flow sheet of page cache method first embodiment of the present invention;
Whether Fig. 2 is to detect to include in the content of the page according to the configuration information of the page in Fig. 1 to need to cache
File the step of refinement schematic flow sheet;
Fig. 3 is refinement schematic flow sheet the step of obtaining the configuration information of the page in Fig. 1;
Fig. 4 is the schematic flow sheet of page cache method fourth embodiment of the present invention;
Fig. 5 is the schematic flow sheet of the embodiment of page cache method the 5th of the present invention;
Fig. 6 be page cache device first embodiment of the present invention, second embodiment, 3rd embodiment, fourth embodiment and
The high-level schematic functional block diagram of 5th embodiment.
The realization, functional characteristics and advantage of the object of the invention will be described further referring to the drawings in conjunction with the embodiments.
Embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
Reference picture 1, page cache method first embodiment of the present invention provide a kind of page cache method, the page cache
Method includes:
Step S10, the page of loading is needed according to corresponding to the page of input loads instruction acquisition.
The present invention is in loading page, it is first determined whether need to cache the files such as the picture in the page, audio, video,
The caching of file is only just carried out when needed, hereby it is achieved that being cached to the selectivity of file in the page., can by the present invention
To configure the files such as the picture only cached in the conventional page, the flow of file download was both reduced, and had decreased system resource
Take.
Specifically, as a kind of embodiment, first, the page loading instruction of user's input is received.Page loading instruction
The corresponding page for needing to load can be webpage or the page of application software.With application software in the present embodiment
The page is illustrated, and application software is disposed in the terminal.
Then mobile terminal is after the page for receiving user's input loads instruction, according to corresponding to obtaining page loading instruction originally
The secondary page for needing to load.
Step S20, the configuration information of the page is obtained, is detected according to the configuration information of the page in the page
Whether the file that need to cache is included in appearance.
After this page that need to load is obtained, acquisition for mobile terminal this need the configuration information of loading page.
Wherein, the configuration information of the page can be pre-configured with, and describing this needs whether loading page needs to cache
File, and it is default, need the information such as the file type that caches.The file type that this page needs to be cached can be figure
The larger file of the consumed flows such as piece, audio, video.
Then, mobile terminal is according to page configuration information, detect whether include in the content that this needs loading page it is pre-
If the file of type.
If this needs the file for including preset kind in the content of loading page, judge that this needs loading page content
In include the file that need to be cached, and by the file of the preset kind detected in content of pages, loading page is needed as this
The middle file that need to be cached;If this needs not including the file for having preset kind in the content of loading page, judge that this need to add
Carrying in content of pages does not have the file that need to be cached.
Further, because the file type that can be cached has a variety of, the file type of the need of different pages caching can be with
Flexible configuration as needed.
If step S30, detecting in the content of the page comprising the file that need to cache, downloading described needs cache file
Cached, and load the page.
Whether loading page is needed comprising after needing the testing result of cache file obtaining this, if this needs loaded page bread
Containing the file that need to be cached, then mobile terminal sends page load request to server, loading page content, according to need to cache text
The download address of part, download this file.
Then, mobile terminal caches this file, is called during for loading this page again, without again from server
Download, reduce flow consumption.
When mobile terminal caches this file, Key-Value (key-value) system can be used, by the download of cache file
Location URL is stored into the spatial cache of local as Key using cache file as Value corresponding to URL.
In the present embodiment, when receiving the page loading instruction of user's input, according to corresponding to obtaining page loading instruction
The page that need to be loaded;Then, obtaining needs the configuration information of loading page, needs whether loading page needs to cache for detecting this
File;Then, need whether to include the text that need to be cached in the content of loading page according to needing the configuration information of loading page to detect
Part;If detecting the file that includes in the content for need loading page and need to cache, the file that downloading to cache is cached, and
Loading page.The present embodiment is only detecting that can just download to cache when needing to include the file that need to be cached in loading page
File is cached, and realizes the individual cultivation that file cache whether is carried out to the page so that user either research staff
Can the page as needed attribute, flexible configuration page properties, the file cache being of little use in the page is reduced, so as to reduce
To the occupancy of system resource, running efficiency of system is improved, optimizes Consumer's Experience.
Further, reference picture 2, page cache method second embodiment of the present invention provide a kind of page cache method, base
In the embodiment shown in above-mentioned Fig. 1, the configuration information of the page includes the interface configuration information of each module in the page, institute
State and detect that the step of whether including the file that need to be cached in the content of the page includes according to the configuration information of the page:
Step S21, according to the interface configuration information of each module, detect whether each module needs caching text respectively
Part.
In the present embodiment, the configuration information of the page, which describes this, needs the interface configuration information of each module in loading page,
Include the file type of each module loading, and whether each module needs to cache the configuration information of the file of its loading.
It should be noted that each module in the page can be understood as in Page Template, different viewing areas or plate pair
Functional module answer, for loading different content.
After the configuration information of the page is obtained, mobile terminal detects each mould respectively according to the interface configuration information of each module
Whether block needs cache file.
If step S22, detecting needs the module of cache file, judge in the content of the page comprising the text that need to be cached
Part.
If detecting, this needs to have one or more modules to need to cache the file of its loading in loading page, judges this
It is secondary to need in loading page comprising the file that cached;And it will need to cache the text loaded required for each module of its load document
Part, the file for needing to need caching in loading page as this.
If detecting, this needs not having module to need to cache the file of its loading in loading page, judges that this needs to load
There is no the file that need to be cached in the page.
Thus, whether obtained this needs in loading page comprising the testing result for needing load document.
In the present embodiment, the configuration information of the page includes each module interface configuration information in the page, then is obtaining the page
Configuration information after, according to the interface configuration information of each module, detect whether each module needs cache file respectively;If detect
The module of cache file is needed, then judges that this is needed in the content of loading page comprising the file that need to be cached.The present embodiment can lead to
The interface configuration information of each module in the page is crossed, is respectively configured whether the file that each module need to correspondingly load in the page needs to delay
Deposit, it is achieved thereby that whether needing separate configurations and the management cached to each file that loading is needed in the same page so that for
The management of cache file is more flexible in the page, without being limited by file type.
Further, reference picture 3, page cache method 3rd embodiment of the present invention provide a kind of page cache method, base
Include in the step of embodiment shown in above-mentioned Fig. 1, the configuration information of the acquisition page:
Step S23, inquiry request is sent to server, obtains the configuration information for the page that the server returns.
After the page that this need to be loaded is obtained, mobile terminal sends inquiry request, this need of acquisition request to server
The configuration information of loading page.It should be noted that carrying this in the inquiry request that mobile terminal is sent needs loading page
Identification information and inquiry purpose so that server according to inquiry request can learn current mobile terminal inquire about specific page
Face, and which information of this page specifically inquired about.
Server is after the inquiry request of mobile terminal transmission is received, from the configuration information for each page being pre-configured with,
Finding this needs the configuration information of loading page.It should be noted that each page being pre-configured with server matches somebody with somebody confidence
Breath, can characterize whether the page needs to carry out the caching of file by different values, for example, 0 identified page need not cache text
Part, 1 identified page need cache file.
Then, this is needed the configuration information of loading page to return to mobile terminal by server.
After mobile terminal receives the page configuration information of server return, detecting this according to the configuration information of the page need to add
Carry in the content of the page and whether include the file that need to be cached.
For example, if the configuration information value of the page is 0, judge that this needs not having the text that need to be cached in the content of loading page
Part;If the configuration information value of the page is 1, judge that this needs to have the file that need to be cached in the content of loading page, download current
All files in the page are downloaded.
Further, when the page needs cache file, the page configuration information that server returns can also include needing to cache
Fileinfo.
Then when there is the file that need to be cached in detecting that this needs the content of loading page, the text of caching is needed in configuration information
Part information, file corresponding to download are cached.
In the present embodiment, the configuration for the page that server returns can be obtained by sending inquiry request to server
Information.Because the configuration information of the page is located at server side, configuration information of the terminal local without memory page, reduce system
The occupancy of internal memory, improve the operational efficiency of terminal.
Further, reference picture 4, page cache method fourth embodiment of the present invention provide a kind of page cache method, base
In the embodiment (the present embodiment is by taking Fig. 1 as an example) shown in above-mentioned Fig. 1, Fig. 2 or Fig. 3, the step S30 includes:
If step S31, detecting in the content of the page comprising the file that need to be cached, institute is searched in local cache
State the file that need to be cached;
If not finding the file that need to be cached step S32, in local cache, downloading described needs cache file to enter
Row caching, and load the page.
The present embodiment is when including the file that need to be cached in detecting that this needs loading page, first in local cache
Search the file for needing to cache.
, can be according to needing cache file when detecting the file that needs cache specifically, as a kind of embodiment
Download address URL, the Value corresponding to lookup in local cache.
If not finding Value corresponding to URL in local cache, judgement does not find in local cache and needs to cache
File, loading this needs loading page, and according to the download address URL of cache file, downloads file and cached.
In the present embodiment, if detecting, this is needed comprising the file that need to be cached in the content of loading page, in local
The file that need to be cached is searched in caching;If not finding the file that need to be cached in local cache, download needs cache file to enter
Row caching, and loading page.The present embodiment is when including the file that need to be cached in detecting that this needs loading page, first at this
The file that need to be cached is searched in ground caching, the download caching of file is just carried out only in the case where not finding, reduces file
Download the flow expended.
Further, reference picture 5, the embodiment of page cache method the 5th of the present invention provide a kind of page cache method, base
After the embodiment shown in above-mentioned Fig. 4, the step S31, in addition to:
If successful search adjusts back the text that need to be cached to the file that need to be cached step S33, in local cache
Part, and load the page.
If finding the file that need to be cached in local cache, the cache file found is adjusted back, for adding for the page
Carry.
If this file that need to be cached has multiple, but the file that part need to cache only is found in local cache, then
The part cache file found is adjusted back, downloading the part not found needs cache file, carries out the loading of the page.
In the present embodiment, if the file that successful search need to cache to the file that need to be cached, readjustment in local cache,
And loading page, so as to reduce the flow of file download consuming.
Further, reference picture 6, page cache device first embodiment of the present invention provide a kind of page cache device, institute
Stating page cache device includes:
Instruction module 10, for needing the page of loading according to corresponding to the loading instruction acquisition of the page of input.
The present invention is in loading page, it is first determined whether need to cache the files such as the picture in the page, audio, video,
The caching of file is only just carried out when needed, hereby it is achieved that being cached to the selectivity of file in the page., can by the present invention
To configure the files such as the picture only cached in the conventional page, the flow of file download was both reduced, and had decreased system resource
Take.
Specifically, as a kind of embodiment, first, instruction module 10 receives the page loading instruction of user's input.Page
The page for needing to load corresponding to the loading instruction of face can be webpage or the page of application software.In the present embodiment with
The page of application software is illustrated.
Then instruction module 10 is after the page loading instruction of user's input is received, according to corresponding to obtaining page loading instruction
The page that this needs loads.
Detection module 20, for obtaining the configuration information of the page, according to the detection of the configuration information of the page
Whether the file that need to cache is included in the content of the page.
After the page that this need to be loaded is obtained, detection module 20, which obtains this, needs the configuration information of loading page.
Wherein, the configuration information of the page can be pre-configured with, and describing this needs whether loading page needs to cache
File, and it is default, need the information such as the file type that caches.The file type that this page needs to be cached can be figure
The larger file of the consumed flows such as piece, audio, video.
It is then detected that whether module 20 detects in the content that this needs loading page and includes according to page configuration information
The file of preset kind.
If this needs the file for including preset kind in the content of loading page, detection module 20 judges that this need to add
Carry in content of pages and include the file that need to be cached, and by the file of the preset kind detected in content of pages, be used as this
Need to need the file cached in loading page;If this needs not including the file for having preset kind in the content of loading page, examine
Survey module 20 and judge that this needs do not have the file that need to be cached in loading page content.
Further, because the file type that can be cached has a variety of, the file type of the need of different pages caching can be with
Flexible configuration as needed.
Load-on module 30, if downloading the need comprising the file that need to be cached in content for detecting the page
Cache file is cached, and loads the page.
Whether loading page is needed comprising after needing the testing result of cache file obtaining this, if this needs loaded page bread
Containing the file that need to be cached, then load-on module 30 sends page load request to server, loading page content, according to needing to cache
The download address of file, download this file.
Then, load-on module 30 caches this file, is called during for loading this page again, without again from service
Device is downloaded, and reduces flow consumption.
When load-on module 30 deposits this file, Key-Value (key-value) system can be used, by the download of cache file
Location URL is stored into the spatial cache of local as Key using cache file as Value corresponding to URL.
In the present embodiment, when instruction module 10 receives the page loading instruction of user's input, loaded and instructed according to the page
The page of loading is needed corresponding to acquisition;It is then detected that module 20, which obtains this, needs the configuration information of loading page, for detecting this
It is secondary to need whether loading page needs cache file;It is then detected that module 20 needs the configuration information of loading page to detect according to this
This needs whether include the file that need to be cached in the content of loading page;If detecting, this needs to wrap in the content of loading page
Containing the file that need to be cached, then load-on module 30 is downloaded the file that need to be cached and cached, and loading page.The present embodiment only exists
Detect that the file that can just download to cache is cached when needing to include in loading page the file that need to be cached, realize pair
Whether the page carries out the individual cultivation of file cache so that user either research staff can the page as needed category
Property, flexible configuration page properties reduce the file cache being of little use in the page, so as to reduce the occupancy to system resource, carried
Running efficiency of system has been risen, has optimized Consumer's Experience.
Further, reference picture 6, page cache device second embodiment of the present invention provide a kind of page cache device, base
In the invention described above page cache device first embodiment, the configuration information of the page includes connecing for each module in the page
Mouth configuration information, the detection module 20 are additionally operable to,
According to the interface configuration information of each module, detect whether each module needs cache file respectively;If inspection
Measuring needs the module of cache file, then judges in the content of the page comprising the file that need to be cached.
In the present embodiment, the configuration information of the page, which describes this, needs the interface configuration information of each module in loading page,
Include the file type of each module loading, and whether each module needs to cache the configuration information of the file of its loading.
It should be noted that each module in the page can be understood as in Page Template, different viewing areas or plate pair
Functional module answer, for loading different content.
After the configuration information of the page is obtained, detection module 20 is according to the interface configuration information of each module, and detection is each respectively
Whether module needs cache file.
If detecting, this needs to have one or more modules to need to cache the file of its loading in loading page, detects mould
Block 20 judges that this is needed in loading page comprising the file that need to be cached;And required for needing to cache each module of its load document
The file of loading, the file for needing to need caching in loading page as this.
If detecting, this needs not having module to need to cache the file of its loading in loading page, and detection module 20 judges
This needs do not have the file that need to be cached in loading page.
Thus, whether detection module 20 has obtained this needs in loading page comprising the testing result for needing load document.
In the present embodiment, the configuration information of the page includes each module interface configuration information in the page, then is obtaining the page
Configuration information after, detection module 20 detects whether each module needs caching text respectively according to the interface configuration information of each module
Part;If detecting needs the module of cache file, detection module 20, which judges that this needs to include in the content of loading page, to be needed to cache
File.The present embodiment can be by the interface configuration information of each module in the page, and each module in the page, which is respectively configured, correspondingly to be needed
Whether the file of loading, which needs, caches, it is achieved thereby that whether needing the independence cached to each file that loading is needed in the same page
Configuration and management so that the management for cache file in the page is more flexible, without being limited by file type.
Further, reference picture 6, page cache device 3rd embodiment of the present invention provide a kind of page cache device, base
In the invention described above page cache device first embodiment, the detection module 20 is used for,
Inquiry request is sent to server, obtains the configuration information for the page that the server returns.
After this page that need to load is obtained, detection module 20 sends inquiry request to server, acquisition request this
Need the configuration information of loading page.It should be noted that carrying this in the inquiry request that detection module 20 is sent needs to load
The identification information and inquiry purpose of the page, so that server can learn that current mobile terminal is inquired about specific according to inquiry request
The page, and which information of this page specifically inquired about.
Server is after the inquiry request of the transmission of detection module 20 is received, from the configuration information for each page being pre-configured with
In, finding this needs the configuration information of loading page.It should be noted that the configuration for each page being pre-configured with server
Information, can characterize whether the page needs to carry out the caching of file by different values, for example, 0 identified page need not cache
File, 1 identified page need cache file.
Then, this is needed the configuration information of loading page to return to detection module 20 by server.
After detection module 20 receives the page configuration information of server return, this need is detected according to the configuration information of the page
Whether the file that need to cache is included in the content of loading page.
For example, if the configuration information value of the page is 0, detection module 20 judges that this needs not having in the content of loading page
The file that need to be cached;If the configuration information value of the page is 1, detection module 20, which judges that this needs to have in the content of loading page, to be needed
The file of caching, all files downloaded in current page are downloaded.
Further, when the page needs cache file, the page configuration information that server returns can also include needing to cache
Fileinfo.
Then detection module 20 is when there is the file that need to be cached in detecting that this needs the content of loading page, load-on module 30
Can be according to the fileinfo that caching is needed in page configuration information, file corresponding to download is cached.
In the present embodiment, detection module 20 can obtain what server returned by sending inquiry request to server
The configuration information of the page.Because the configuration information of the page is located at server side, configuration information of the terminal local without memory page,
Reduce the occupancy of Installed System Memory, improve the operational efficiency of terminal.
Further, reference picture 6, page cache device fourth embodiment of the present invention provide a kind of page cache device, base
In the invention described above page cache device first embodiment, second embodiment or 3rd embodiment, the load-on module 30 is also used
In,
If detecting in the content of the page comprising the file that need to cache, being searched in local cache described needs to cache
File;If not finding the file that need to be cached in local cache, download it is described need cache file to be cached, and
Load the page.
When including the file that need to be cached in detecting that this needs loading page, load-on module 30 exists the present embodiment first
The file for needing to cache is searched in local cache.
Specifically, as a kind of embodiment, when detecting the file that needs cache, load-on module 30 can be according to need
The download address URL of cache file, the Value corresponding to lookup in local cache.
If load-on module 30 does not find Value corresponding to URL in local cache, load-on module 30 is judged in local
The file that need to be cached is not found in caching, loading this needs loading page, and according to the download address URL of cache file, under
Published article part is cached.
In the present embodiment, if detecting, this needs to load mould comprising the file that need to be cached in the content of loading page
Block 30 searches the file that need to be cached in local cache;If not finding the file that need to be cached in local cache, mould is loaded
Block 30, which is downloaded, needs cache file to be cached, and loading page.The present embodiment is included in detecting that this needs loading page and needed
During the file of caching, the file that need to be cached is searched first in local cache, file is just carried out only in the case where not finding
Download caching, reduce file download consuming flow.
Further, reference picture 6, the embodiment of page cache device the 5th of the present invention provide a kind of page cache device, base
In the invention described above page cache device fourth embodiment, the load-on module 30 is additionally operable to,
If successful search adjusts back the file that need to be cached and carries out institute to the file that need to be cached in local cache
Loading is stated, and loads the page.
If load-on module 30 finds the file that need to be cached in local cache, the cache file found is adjusted back, is used
In the loading of the page.
If this file that need to be cached has multiple, but load-on module 30 only finds part in local cache and needs to cache
File, then load-on module 30 adjust back the part cache file that finds, downloading the part not found needs cache file, carries out
The loading of the page.
In the present embodiment, if successful search needs to the file that need to be cached, the readjustment of load-on module 30 in local cache
The file of caching, and loading page, so as to reduce the flow of file download consuming.
The alternative embodiment of the present invention is these are only, is not intended to limit the scope of the invention, it is every to utilize this hair
The equivalent structure or equivalent flow conversion that bright specification and accompanying drawing content are made, or directly or indirectly it is used in other related skills
Art field, is included within the scope of the present invention.
Claims (10)
1. a kind of page cache method, it is characterised in that the page cache method comprises the following steps:
The page of loading is needed according to corresponding to the page of input loads instruction acquisition;
The configuration information of the page is obtained, is detected in the content of the page and whether included according to the configuration information of the page
There is the file that need to be cached;
If detecting in the content of the page comprising the file that need to cache, download it is described need cache file to be cached, and
Load the page.
2. page cache method as claimed in claim 1, it is characterised in that the configuration information of the page includes the page
In each module interface configuration information, whether described detected according to the configuration information of the page in the content of the page include
There is the step of file that need to be cached to include:
According to the interface configuration information of each module, detect whether each module needs cache file respectively;
If detecting needs the module of cache file, judge in the content of the page comprising the file that need to be cached.
3. page cache method as claimed in claim 1, it is characterised in that the step of the configuration information for obtaining the page
Suddenly include:
Inquiry request is sent to server, obtains the configuration information for the page that the server returns.
4. the page cache method as described in claim 1,2 or 3, it is characterised in that if described detect the interior of the page
Comprising the file that need to cache in appearance, then download it is described need cache file to be cached, and include the step of load the page:
If detecting in the content of the page comprising the file that need to be cached, the text that need to be cached is searched in local cache
Part;
If not finding the file that need to be cached in local cache, download it is described need cache file to be cached, and add
Carry the page.
5. page cache method as claimed in claim 4, it is characterised in that described searched in local cache described needs to cache
File the step of after, in addition to:
If successful search adjusts back the file that need to be cached and carries out described add to the file that need to be cached in local cache
Carry, and load the page.
6. a kind of page cache device, it is characterised in that the page cache device includes:
Instruction module, for needing the page of loading according to corresponding to the loading instruction acquisition of the page of input;
Detection module, for obtaining the configuration information of the page, the page is detected according to the configuration information of the page
Whether the file that need to cache is included in content;
Load-on module, if comprising the file that need to be cached in content for detecting the page, downloading described need to cache text
Part is cached, and loads the page.
7. page cache device as claimed in claim 6, it is characterised in that the configuration information of the page includes the page
In each module interface configuration information, the detection module is additionally operable to,
According to the interface configuration information of each module, detect whether each module needs cache file respectively;If detect
The module of cache file is needed, then is judged in the content of the page comprising the file that need to be cached.
8. page cache device as claimed in claim 6, it is characterised in that the detection module is additionally operable to,
Inquiry request is sent to server, obtains the configuration information for the page that the server returns.
9. the page cache device as described in claim 6,7 or 8, it is characterised in that the load-on module is additionally operable to,
If detecting in the content of the page comprising the file that need to be cached, the text that need to be cached is searched in local cache
Part;If not finding the file that need to be cached in local cache, download it is described need cache file to be cached, and load
The page.
10. page cache device as claimed in claim 9, it is characterised in that the load-on module is additionally operable to,
If successful search adjusts back the file that need to be cached and carries out described add to the file that need to be cached in local cache
Carry, and load the page.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610581496.5A CN107644038A (en) | 2016-07-20 | 2016-07-20 | Page cache method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610581496.5A CN107644038A (en) | 2016-07-20 | 2016-07-20 | Page cache method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107644038A true CN107644038A (en) | 2018-01-30 |
Family
ID=61109897
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610581496.5A Pending CN107644038A (en) | 2016-07-20 | 2016-07-20 | Page cache method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107644038A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109254812A (en) * | 2018-08-08 | 2019-01-22 | 连尚(新昌)网络科技有限公司 | A kind of method, system, terminal and server updating Shipping Options Page |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130167008A1 (en) * | 2011-12-21 | 2013-06-27 | Samsung Electronics Co., Ltd. | Image forming apparatus and web information providing method |
US20140075126A1 (en) * | 2007-12-10 | 2014-03-13 | Microsoft Corporation | Management of external memory functioning as virtual cache |
CN103744845A (en) * | 2013-03-01 | 2014-04-23 | 王新 | Method and system for WEB platform data caching |
CN104461491A (en) * | 2013-09-24 | 2015-03-25 | 阿里巴巴集团控股有限公司 | Running method and system of Hybrid components |
CN105550338A (en) * | 2015-12-23 | 2016-05-04 | 北京大学 | HTML5 application cache based mobile Web cache optimization method |
CN105760405A (en) * | 2014-12-19 | 2016-07-13 | 阿里巴巴集团控股有限公司 | Methods and devices for obtaining network resource for loading web page and method and device for caching network resource |
-
2016
- 2016-07-20 CN CN201610581496.5A patent/CN107644038A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140075126A1 (en) * | 2007-12-10 | 2014-03-13 | Microsoft Corporation | Management of external memory functioning as virtual cache |
US20130167008A1 (en) * | 2011-12-21 | 2013-06-27 | Samsung Electronics Co., Ltd. | Image forming apparatus and web information providing method |
CN103744845A (en) * | 2013-03-01 | 2014-04-23 | 王新 | Method and system for WEB platform data caching |
CN104461491A (en) * | 2013-09-24 | 2015-03-25 | 阿里巴巴集团控股有限公司 | Running method and system of Hybrid components |
CN105760405A (en) * | 2014-12-19 | 2016-07-13 | 阿里巴巴集团控股有限公司 | Methods and devices for obtaining network resource for loading web page and method and device for caching network resource |
CN105550338A (en) * | 2015-12-23 | 2016-05-04 | 北京大学 | HTML5 application cache based mobile Web cache optimization method |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109254812A (en) * | 2018-08-08 | 2019-01-22 | 连尚(新昌)网络科技有限公司 | A kind of method, system, terminal and server updating Shipping Options Page |
CN109254812B (en) * | 2018-08-08 | 2021-10-29 | 连尚(新昌)网络科技有限公司 | Method, system, terminal and server for updating label page |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110096660A (en) | Method, apparatus and electronic equipment for loading page picture | |
CN104933363B (en) | Method and device for detecting malicious file | |
WO2019149026A1 (en) | Method and device for generating link for application page, storage medium, and electronic apparatus | |
US20150082151A1 (en) | Page display method and device | |
CN104182408B (en) | A kind of webpage offline access method and device | |
CN103281397A (en) | Data-caching method and system based on timestamps and access density | |
WO2008021333B1 (en) | System and method for placing a widget onto a desktop | |
CN106462635B (en) | Intelligent webpage content interception | |
CN104965842A (en) | Search recommending method and apparatus | |
CN113489788B (en) | Data route control and data analysis processing method and device, equipment and medium | |
CN105320661A (en) | Resource downloading method and device | |
CN105897835A (en) | Mobile terminal browser file transfer method and mobile terminal | |
CN109948090A (en) | Webpage loading method and device | |
CN106341420A (en) | Method and system for rapid developing applications based on search and play mode | |
CN102769641A (en) | Method and system for displaying webpage content by means of self-adaption control | |
WO2015003618A1 (en) | Method and apparatus for webpage browsing | |
CN109937566A (en) | Method and apparatus for carrying out calculating unloading in networked environment | |
CN110019552A (en) | User pays close attention to the method and apparatus that state updates | |
WO2014146450A1 (en) | Method, device and system for data searching | |
CN104281619A (en) | System and method for ordering search results | |
CN108134811B (en) | Method, device and system for distributing or downloading target file | |
CN111381845A (en) | Software gray scale upgrading method and device, storage medium, terminal and server | |
US20130325616A1 (en) | Location-based and context-aware advertising platform | |
CN106201736A (en) | Pre-cache method and device thereof | |
CN101924791B (en) | Method, device and system for displaying multimedia information |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180130 |
|
RJ01 | Rejection of invention patent application after publication |