CN108600382A - A kind of method and computer readable storage medium of the APP content cachings in internet off-line - Google Patents

A kind of method and computer readable storage medium of the APP content cachings in internet off-line Download PDF

Info

Publication number
CN108600382A
CN108600382A CN201810404616.3A CN201810404616A CN108600382A CN 108600382 A CN108600382 A CN 108600382A CN 201810404616 A CN201810404616 A CN 201810404616A CN 108600382 A CN108600382 A CN 108600382A
Authority
CN
China
Prior art keywords
app
internet
line
caching
content
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
Application number
CN201810404616.3A
Other languages
Chinese (zh)
Inventor
陈思东
罗冬云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Linxin Mdt Infotech Ltd
Original Assignee
Guangzhou Linxin Mdt Infotech Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Guangzhou Linxin Mdt Infotech Ltd filed Critical Guangzhou Linxin Mdt Infotech Ltd
Priority to CN201810404616.3A priority Critical patent/CN108600382A/en
Publication of CN108600382A publication Critical patent/CN108600382A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

A method of the APP content cachings in internet off-line, it is related to computer software technical field, it receives the page request of APP transmissions, APP judges whether local cache, network request is sent if APP is without caching, it asks successfully then to cache content of pages in local for load use next time, and then the display caching page, the caching page is directly displayed if APP has caching, the present invention can reduce period of reservation of number, APP can be used always in the absence of network is bad or network simultaneously, and user experience can be improved.

Description

A kind of method of APP content cachings in internet off-line and computer-readable storage Medium
Technical field
The present invention relates to computer software technical fields, more particularly to a kind of APP content cachings in internet off-line Method and computer readable storage medium.
Background technology
The hybrid mode that uses at present make APP (Hybrid App, half primary half HTML exploitations) because its is cost-effective and The advantages that time, shortening APP development cycles and energy cross-platform use, is extremely welcome and becomes exploitation mainstream.This development scheme 70%~80% is accounted for, half primary exploitation content accounting is small, ensures its HTML content normal use highly dependent upon network, once network It disconnects, APP is almost at unusable state.
Invention content
One kind APP contents in internet off-line are provided it is an object of the invention to avoid shortcoming in the prior art The method and computer readable storage medium of caching the method for APP content cachings and computer-readable should be deposited in internet off-line Storage media can reduce period of reservation of number, while can use APP always in the absence of network is bad or network, improve and use It experiences at family.
The purpose of the present invention is achieved through the following technical solutions:
A kind of method of the APP content cachings in internet off-line is provided, the page request of APP transmissions is received, APP judgements are No there are local caches, send network request if APP is without caching, content of pages is cached if request successfully in local for next time Load uses, and then the display caching page, and the caching page is directly displayed if APP has caching.
Wherein, if APP has caching, when sending Asynchronous Request judgement update while directly displaying the caching page Between, if renewal time reaches preset value, sends network request and obtain with the presence or absence of update, then synchronized if there is update Newest content of pages is obtained, the current cache page is refreshed.
Wherein, if renewal time does not meet preset value, content of pages is not updated.
Wherein, network request failure is sent out with regard to ending request if reaching preset value in renewal time.
Wherein, the method for the caching page is:First judge whether CACHE DIRECTORY, there is no then directly create caching Catalogue and network request download configuration file is sent out, corresponding resource file is downloaded according to configuration file, resource is finally presented File;Remote profile is then obtained if there is CACHE DIRECTORY, for being compared with local profile, the update of difference formula/ Resource file is deleted, local profile is covered after having handled resource file, finally shows resource file.
Wherein, judge whether that CACHE DIRECTORY is specifically to judge whether cache contents homepage.
Wherein, the method for obtaining remote profile:The network address for obtaining remote profile, accesses the network address To download remote profile.
Wherein, the method that remote profile is used for and local profile compares:Remote profile is obtained to correspond to The version number of content compares the version number of local profile, it is found that version number is variant, update the resource text of highest version Part after resource file is downloaded, deletes legacy version money if there is no whole resource file downloads are carried out if local profile Source file loads new version resource file.
Wherein, after resource file update, current renewal time is recorded.
A kind of computer readable storage medium, for storing computer program, it is characterised in that:The computer program is adjusted The method that used time executes the above-described APP content cachings in internet off-line.
Beneficial effects of the present invention:
The present invention be directed to the scenes of offline unavailable APP, have used caching technology to cache the important service page, have such as stepped on Record, personal information, the pages such as data manipulation, after caching in the case of offline can also normal browsing use, then operation data It keeps in into local data base (sqllite), restores to carry out data upload again when network connection so that APP is in off-line case It can normal use.
The present invention is that off-line using APP leads to relative to current online Hybrid APP, great advantage It crosses caching and judges structure, can reduce period of reservation of number, while can be used always in the absence of network is bad or network APP, this is the APP load fluencies and friendly offline usage experience that online Hybrid APP can not possess.
Description of the drawings
Invention is described further using attached drawing, but the embodiment in attached drawing does not constitute any limitation of the invention, For those of ordinary skill in the art, without creative efforts, it can also be obtained according to the following drawings Its attached drawing.
Fig. 1 is a kind of flow chart of the method for APP content cachings in internet off-line of the present invention.
Fig. 2 is the flow chart for caching the page.
Specific implementation mode
The invention will be further described with the following Examples.
In clothes meeting for the placement of orders, the travelling trader for coming to order goods needs to need using APP selections in a closed occasion in a short time The clothes fashion and quantity wanted, therefore, clothes meeting for the placement of orders can arrange network, order goods and use for APP, however, in order to avoid prominent Right suspension impacts order, the APP of order is cached so that can continue to order goods when suspension.
As shown in Figure 1:When operating each page of APP, APP, that is, terminal can all send page request, receive terminal The page request of transmission, APP judge whether local cache, network request are sent if APP is without caching, if request successfully It caches content of pages to use for load next time in local, and then the display caching page, caching is directly displayed if APP has caching The page, if APP has caching, transmission Asynchronous Request judges renewal time while directly displaying the caching page, if more The new time reaches preset value, then sends network request and obtain with the presence or absence of update, then synchronized if there is update obtain it is newest Content of pages refreshes the current cache page and does not update content of pages if renewal time does not meet preset value.
Specifically, sending out network request failure with regard to ending request if reaching preset value in renewal time.
More than, can quick response request page (the caching page can be directly displayed there are caching, then Asynchronous Request update), prevent It only loads too long, influences user experience.Needs first time networking loading page simultaneously, cooperation local data base (sqllite), By caching, business processing can be also carried out in the case of offline, follow-up networking can upload data.
As shown in Fig. 2, the method for the caching page is:First judge whether CACHE DIRECTORY (first switches on APP), cache contents homepage is specifically judged whether, there is no then directly create CACHE DIRECTORY and send out network request Download configuration file downloads corresponding resource file according to configuration file, resource file is finally presented;If there is CACHE DIRECTORY The network address for then obtaining remote profile accesses the network address to download remote profile, for matching with local File to be set to compare, difference formula updates/resource file is deleted, local profile is covered after having handled resource file, it is final aobvious Show resource file.
Primary deletion action can be also executed when there is no CACHE DIRECTORY, although knowing that it is not present, this is a kind of guarantor The means of danger can avoid system existing defects.
Specifically, the method that remote profile is used for and local profile compares:Obtain remote profile pair The version number of content is answered to compare the version number of local profile, it is found that version number is variant, updates the resource text of highest version Part after resource file is downloaded, deletes legacy version money if there is no whole resource file downloads are carried out if local profile Source file loads new version resource file and records current renewal time after resource file updates, when for judging setting Between be spaced in repeat to open whether the current update page needs to update resource file, that is, complete caching current page it Afterwards, current time point is recorded, is preserved as foundation, if reopening this page next time, takes the time point preserved It is compared with current point in time, time interval is greater than the set value, then goes loading page again;It then need not be more if being less than Newly, this mechanism can prevent transition repetitive requests loading page, and APP is caused to show white screen.
The present embodiment also provides a kind of computer readable storage medium, for storing computer program, the computer program The method that the above-described APP content cachings in internet off-line are executed when called.
The present embodiment is relative to current online Hybrid APP, great advantage, off-line using APP, Judge structure by caching, can reduce period of reservation of number, while can make always in the absence of network is bad or network With APP, this is the APP load fluencies and friendly offline usage experience that online Hybrid APP can not possess.
The present embodiment is to have used caching technology to cache the important service page, such as the scene of offline unavailable APP Log in, personal information, the pages such as data manipulation, after caching in the case of offline can also normal browsing use, then operand According to keeping in into local data base (sqllite), restore to carry out data upload again when network connection so that APP is in off-line case It can be used normally.
Finally it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, rather than the present invention is protected The limitation of range is protected, although being explained in detail to the present invention with reference to preferred embodiment, those skilled in the art answer Work as understanding, technical scheme of the present invention can be modified or replaced equivalently, without departing from the reality of technical solution of the present invention Matter and range.

Claims (10)

1. a kind of method of the APP content cachings in internet off-line, it is characterised in that:Receive the page request of APP transmissions, APP It judges whether local cache, sends network request if APP is without caching, content of pages is cached if request successfully in local It is used for load next time, and then the display caching page, the caching page is directly displayed if APP has caching.
2. a kind of method of the APP content cachings in internet off-line as described in claim 1, it is characterised in that:If APP is deposited It is caching, sending Asynchronous Request while directly displaying the caching page judges renewal time, if renewal time reaches default Value then sends network request and obtains with the presence or absence of update, then synchronized if there is update and obtain newest content of pages, refreshing is worked as The preceding caching page.
3. a kind of method of the APP content cachings in internet off-line as claimed in claim 2, it is characterised in that:If update Time does not meet preset value, then does not update content of pages.
4. a kind of method of the APP content cachings in internet off-line as claimed in claim 2, it is characterised in that:If more The new time reaches preset value and sends out network request failure with regard to ending request.
5. a kind of method of the APP content cachings in internet off-line as described in claim 1, it is characterised in that:The caching The method of the page is:First judge whether CACHE DIRECTORY, there is no then directly create CACHE DIRECTORY and send out network request Download configuration file downloads corresponding resource file according to configuration file, resource file is finally presented;If there is CACHE DIRECTORY Remote profile is then obtained, for being compared with local profile, difference formula updates/resource file is deleted, handle money Local profile is covered after source file, finally shows resource file.
6. a kind of method of the APP content cachings in internet off-line as claimed in claim 5, it is characterised in that:Judge whether It is specifically to judge whether cache contents homepage there are CACHE DIRECTORY.
7. a kind of method of the APP content cachings in internet off-line as claimed in claim 5, it is characterised in that:It obtains long-range The method of configuration file:The network address for obtaining remote profile, accesses the network address to download remote profile.
8. a kind of method of the APP content cachings in internet off-line as claimed in claim 5, it is characterised in that:Remote configuration The method that file is used for and local profile compares:The version number of remote profile corresponding content is obtained to compare local The version number of configuration file finds that version number is variant, updates the resource file of highest version, if local profile is not present Whole resource file downloads are then carried out, after resource file is downloaded, delete legacy version resource file, load new version resource text Part.
9. a kind of method of the APP content cachings in internet off-line as claimed in claim 8, it is characterised in that:Resource file After update, current renewal time is recorded.
10. a kind of computer readable storage medium, for storing computer program, it is characterised in that:The computer program is adjusted Used time perform claim requires the method for APP content cachings in internet off-line described in 1 to 9 any one.
CN201810404616.3A 2018-04-28 2018-04-28 A kind of method and computer readable storage medium of the APP content cachings in internet off-line Pending CN108600382A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810404616.3A CN108600382A (en) 2018-04-28 2018-04-28 A kind of method and computer readable storage medium of the APP content cachings in internet off-line

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810404616.3A CN108600382A (en) 2018-04-28 2018-04-28 A kind of method and computer readable storage medium of the APP content cachings in internet off-line

Publications (1)

Publication Number Publication Date
CN108600382A true CN108600382A (en) 2018-09-28

Family

ID=63619395

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810404616.3A Pending CN108600382A (en) 2018-04-28 2018-04-28 A kind of method and computer readable storage medium of the APP content cachings in internet off-line

Country Status (1)

Country Link
CN (1) CN108600382A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109451064A (en) * 2018-12-26 2019-03-08 深圳左邻永佳科技有限公司 Offline implementation method, device, computer equipment and the storage medium of web application
CN109542347A (en) * 2018-11-19 2019-03-29 浪潮电子信息产业股份有限公司 Data migration method, device and equipment and readable storage medium
CN110377360A (en) * 2019-07-12 2019-10-25 深圳市酷开网络科技有限公司 Method, display terminal and the computer readable storage medium that webview is quickly loaded
WO2021223658A1 (en) * 2020-05-07 2021-11-11 支付宝(杭州)信息技术有限公司 Mini program update
CN113971057A (en) * 2020-07-22 2022-01-25 北京奇虎科技有限公司 Page component information caching method, device, equipment and storage medium
CN114120964A (en) * 2021-11-04 2022-03-01 广州小鹏汽车科技有限公司 Voice interaction method and device, electronic equipment and readable storage medium
CN114371887A (en) * 2022-01-12 2022-04-19 挂号网(杭州)科技有限公司 Method, device, equipment and medium for preloading application program based on Weex framework
WO2023272919A1 (en) * 2021-07-02 2023-01-05 厦门雅基软件有限公司 Resource data reading method and apparatus, and electronic device and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070239725A1 (en) * 2006-03-28 2007-10-11 Microsoft Corporation Active cache offline access and management of project files
CN103186594A (en) * 2011-12-29 2013-07-03 盛乐信息技术(上海)有限公司 WebAPP dynamic offline memory system and method
CN103257973A (en) * 2012-02-20 2013-08-21 腾讯科技(深圳)有限公司 Method and system for updating browser cache
CN104106048A (en) * 2012-02-16 2014-10-15 微软公司 Using application cache to update resources of installed applications
US20150199278A1 (en) * 2013-01-30 2015-07-16 Google Inc. Clearing an application cache
CN104965717A (en) * 2014-06-05 2015-10-07 腾讯科技(深圳)有限公司 Method and apparatus for loading page
CN105847430A (en) * 2016-05-20 2016-08-10 北京小米移动软件有限公司 Hybrid application page data access method and device
CN106951323A (en) * 2017-03-09 2017-07-14 深圳峰创智诚科技有限公司 Application program local cache method and apparatus
CN107729331A (en) * 2016-08-11 2018-02-23 凡学(上海)教育科技有限公司 A kind of method of Mobile solution cache HTML5 page resources

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070239725A1 (en) * 2006-03-28 2007-10-11 Microsoft Corporation Active cache offline access and management of project files
CN103186594A (en) * 2011-12-29 2013-07-03 盛乐信息技术(上海)有限公司 WebAPP dynamic offline memory system and method
CN104106048A (en) * 2012-02-16 2014-10-15 微软公司 Using application cache to update resources of installed applications
CN103257973A (en) * 2012-02-20 2013-08-21 腾讯科技(深圳)有限公司 Method and system for updating browser cache
US20150199278A1 (en) * 2013-01-30 2015-07-16 Google Inc. Clearing an application cache
CN104965717A (en) * 2014-06-05 2015-10-07 腾讯科技(深圳)有限公司 Method and apparatus for loading page
CN105847430A (en) * 2016-05-20 2016-08-10 北京小米移动软件有限公司 Hybrid application page data access method and device
CN107729331A (en) * 2016-08-11 2018-02-23 凡学(上海)教育科技有限公司 A kind of method of Mobile solution cache HTML5 page resources
CN106951323A (en) * 2017-03-09 2017-07-14 深圳峰创智诚科技有限公司 Application program local cache method and apparatus

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109542347A (en) * 2018-11-19 2019-03-29 浪潮电子信息产业股份有限公司 Data migration method, device and equipment and readable storage medium
CN109542347B (en) * 2018-11-19 2022-02-18 浪潮电子信息产业股份有限公司 Data migration method, device and equipment and readable storage medium
CN109451064A (en) * 2018-12-26 2019-03-08 深圳左邻永佳科技有限公司 Offline implementation method, device, computer equipment and the storage medium of web application
CN109451064B (en) * 2018-12-26 2021-08-17 深圳左邻永佳科技有限公司 Off-line implementation method and device of web application, computer equipment and storage medium
CN110377360A (en) * 2019-07-12 2019-10-25 深圳市酷开网络科技有限公司 Method, display terminal and the computer readable storage medium that webview is quickly loaded
WO2021223658A1 (en) * 2020-05-07 2021-11-11 支付宝(杭州)信息技术有限公司 Mini program update
CN113971057A (en) * 2020-07-22 2022-01-25 北京奇虎科技有限公司 Page component information caching method, device, equipment and storage medium
WO2023272919A1 (en) * 2021-07-02 2023-01-05 厦门雅基软件有限公司 Resource data reading method and apparatus, and electronic device and storage medium
CN114120964A (en) * 2021-11-04 2022-03-01 广州小鹏汽车科技有限公司 Voice interaction method and device, electronic equipment and readable storage medium
CN114120964B (en) * 2021-11-04 2022-10-14 广州小鹏汽车科技有限公司 Voice interaction method and device, electronic equipment and readable storage medium
CN114371887A (en) * 2022-01-12 2022-04-19 挂号网(杭州)科技有限公司 Method, device, equipment and medium for preloading application program based on Weex framework

Similar Documents

Publication Publication Date Title
CN108600382A (en) A kind of method and computer readable storage medium of the APP content cachings in internet off-line
US8688771B2 (en) Method of providing content to a mobile web browsing device
CN106446174A (en) Method for page loading in application
CN102667772B (en) File level hierarchical storage management system, method, and apparatus
CN104348849B (en) Instant messaging key-value data distributing method, server, client and system
CN110795457B (en) Data caching processing method, device, computer equipment and storage medium
US20100131593A1 (en) Relay server, mobile terminal, information browsing system and method thereof
CN103607312B (en) Data request processing method and system for server system
US20140013238A1 (en) File transfer method and device
CN106294365A (en) The page data processing method of a kind of single page web application and equipment
CN111147599B (en) Cache data updating method and device, server and storage medium
CN105208127A (en) Webpage caching processing method and system and intelligent terminal
US10649964B2 (en) Incorporating external data into a database schema
CN107438084A (en) Multi-client data synchronization method and apparatus
CN106446075A (en) Page request processing method and apparatus
CN106202578A (en) A kind of browser local information synchronization processing method and device
CN106201736A (en) Pre-cache method and device thereof
CN103269353B (en) Web caches back source optimization method and Web caching system
CN108170745B (en) Method and terminal for accessing cache data of web terminal
WO2004001588A2 (en) A system and method to re-synchronize client devices while refreshing them from a server
CN104243602A (en) User information synchronization device, system and method
CN109165078B (en) Virtual distributed server and access method thereof
CN112988879B (en) Method, system, device, storage medium and processor for accessing database
CN106254411A (en) For providing the system of service, server system and method
CN105242960A (en) Method for processing system function call request and browser

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: 20180928

RJ01 Rejection of invention patent application after publication