CN103186594A - WebAPP dynamic offline memory system and method - Google Patents

WebAPP dynamic offline memory system and method Download PDF

Info

Publication number
CN103186594A
CN103186594A CN 201110454133 CN201110454133A CN103186594A CN 103186594 A CN103186594 A CN 103186594A CN 201110454133 CN201110454133 CN 201110454133 CN 201110454133 A CN201110454133 A CN 201110454133A CN 103186594 A CN103186594 A CN 103186594A
Authority
CN
China
Prior art keywords
webapp
resource
current web
web app
memory module
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
CN 201110454133
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.)
Shengle Information Technolpogy Shanghai Co Ltd
Original Assignee
Shengle Information Technolpogy Shanghai Co 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 Shengle Information Technolpogy Shanghai Co Ltd filed Critical Shengle Information Technolpogy Shanghai Co Ltd
Priority to CN 201110454133 priority Critical patent/CN103186594A/en
Publication of CN103186594A publication Critical patent/CN103186594A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a WebAPP dynamic offline memory system and method. Each WebAPP resource accessed by a user is cached to a local computer to be stored through a memory module, then the existing WebAPP resource in the memory module is loaded offline through a loading module, or the WebAPP resource which is not cached is loaded through the internet, the WebAPP resource in the memory module is updated through an updating module, the WebAPP resource accessed by the user can be automatically cached to the local computer, so that the WebAPP can be used by the user under an offline situation, traceless switching of an offline way and an online way of the WebAPP can be realized, and the system and the method are applicable to different WebAPPs supporting offline applications.

Description

The dynamic off line storage system of WebAPP and method
Technical field
The present invention relates to technical field of the computer network, relate in particular to the dynamic off line storage system of a kind of WebAPP and method.
Background technology
Along with popularizing of mobile Internet, handheld device is widely used, and the fast development of Web technology such as HTML5, and each major company is all in the WebApp Development Framework of releasing oneself.
WebApp refers to that based on the system of Web and application its effect is to issue a complex set of content and function to vast final user.From a simple webpage that helps the consumer to calculate the automobile rates, to the large complicated WEB website that a complete set of tourist service is provided for commercial staff and holiday maker, all be WebApp.It comprises the WEB website that some are complete, and the dedicated functions of WEB website and the information processing on Internet, Intranet or ExtraNet are used.
The user uses browser rs cache at user disk storage web single page usually, has saved bandwidth when the user browses again, even if but like this, still can't not have to visit web application under the situation of Internet.In order to allow the weblication also can be accessed in off-line state, HTML5 provides the offline storage function by ApplicationCache.Application Cache uses the Manifest file to specify the required resource of current Web App, and browser comes different resources is arranged different strategies according to the content of manifest file.When the user browses this webpage again, if there is this resource among the Application Cache, then at first from Application Cache, load, and determine whether that by the manifest file that contrasts on local manifest file and the server needs upgrade the resource of local Cache.
Application Cache is a kind of Cache of static state in essence, and demand user at first specifies all to need the resource of Cache in manifest, and can not come the Cache resource according to the situation of user's visit.In certain situation, the developer may and not know the resource that they are all, and for example therefore the file uploaded of user can not specify by manifest this moment.
In addition, in main flow browsers such as IE, FireFox, also there is offline mode, under off-line case, can uses Cache at the webpage of this locality.But because offline mode is opposed with normal mode, therefore under offline mode, even network is available, can not normally show not by the external web page of Cache.
Summary of the invention
The object of the present invention is to provide the dynamic off line storage system of a kind of WebAPP and method, support all kinds of WebAPP that off-line is used, the automatic Cache of WebAPP resource of user's visit can be arrived this locality, under off-line case, also can use this WebAPP to guarantee the user.
For addressing the above problem, the invention provides the dynamic off line storage system of a kind of WebAPP, comprising:
Memory module, the resource Cache that is used for each WebAPP that the user was visited preserves to local;
Load-on module, for the resource that loads current Web APP, elder generation judges whether the resource of current Web APP is arrived local the preservation by Cache before loading, if, the resource of loading current Web APP from all resources that described memory module is preserved; If not, network loads the resource of current Web APP, and calls described memory module, and the resource Cache of current Web APP is preserved to local;
Update module is used for after the resource of described load-on module loading current Web APP finishes, and the resource of the described current Web APP of background update is in described memory module.
Further, described memory module comprises Database Unit and buffer unit, and the resource Cache that described buffer unit is used for each WebAPP that the user was visited is to this locality and the resource of preserving described each WebAPP; Described Database Unit is used for the resource of each WebAPP of sign and in the position of described buffer unit, sets up the index information of each WebAPP.
Further, described Database Unit adopts the SQLITE3 database, the URL of the resource of each WebAPP is identified resource and the position in described buffer unit thereof of each WebAPP as keyword.
Further, the resource that described buffer unit is preserved described each WebAPP with file mode, the http response message of also preserving described each WebAPP simultaneously.
Further, described update module is upgraded the resource of described current Web APP one by one in described memory module by the http agreement, and after renewal is finished, notifies described current Web App to switch to new WebApp environment with the form of JavaScript event.
Accordingly, the present invention also provides a kind of WebAPP dynamic off line storage means, may further comprise the steps:
Described memory module is preserved the resource Cache of each WebAPP that the user visited to local;
Startup current Web APP, described load-on module judge whether the resource of current Web APP is preserved to local by Cache, if, the resource of loading current Web APP from all resources that described memory module is preserved; If not, network loads the resource of current Web APP, and calls described memory module, and the resource Cache of current Web APP is preserved to local;
After the resource of described load-on module loading current Web APP finished, the resource of the described current Web APP of described update module background update was in described memory module.
Compared with prior art, the dynamic off line storage system of WebAPP provided by the invention and method, the resource Cache of each WebAPP that the user was visited by memory module preserves to local, load the not WebAPP resource of Cache storage by the existing WebAPP resource in the load-on module off line load store module or network then, pass through the resource of the WebAPP in the update module updated stored module again, the automatic Cache of WebAPP resource of user's visit can be arrived local, to guarantee that the user also can use this WebAPP under off-line case, can realize the seamless switching of WebApp off-line and online mode, be applicable to all kinds of WebAPP that support that off-line is used.
Description of drawings
Fig. 1 is the configuration diagram of the dynamic off line storage system of the WebAPP of one embodiment of the invention;
Fig. 2 is the process flow diagram of the dynamic off line storage means of the WebAPP of one embodiment of the invention.
Embodiment
Among the present invention, (URL(uniform resource locator) UniformResourceLocator) is also referred to as web page address to URL, is the resource addresses of standard on the Internet;
Below in conjunction with the drawings and specific embodiments WebAPP management system and the application process thereof that the present invention proposes is described in further detail.
As shown in Figure 1, the invention provides the dynamic off line storage system of a kind of WebAPP, comprise memory module 11, load-on module 12 and update module 13.
Memory module 11 comprises Database Unit 111 and buffer unit 112, the resource Cache that described buffer unit 112 is used for each WebAPP that the user was visited is to resource local and that preserve described each WebAPP with file mode, the http response message of also preserving described each WebAPP simultaneously; Described Database Unit 111 is used for the resource of each WebAPP of sign and in the position of described buffer unit, sets up the index information of each WebAPP.
Wherein, http response is similar to the HTTP request, constituted by 3 parts, and be respectively agreement and status code, head response and response text.Agreement and version, status code and state description that the 1st line display communication of http response is used.Status code wherein provides; A lot of useful informations about server end have been comprised in the http response head, as the information such as type, content type and length of server; The response text is exactly the content that the user sees when browsing page, can comprise various information, comprises literal, picture and animation etc.
In Web framework (Web FrameWork), the method that is used for sign WebApp has a lot, comprises the ID mode of use name, similar domain name and URL etc.Through overtesting, use the URL mode relatively more succinct, convenient, so Database Unit 111 adopts URL to identify WebApp in this enforcement.
In computer technology, realize that the method for search index is a lot, have based on file, based on database.More common based on database wherein, Database Unit 111 adopts the SQLITE3 database to preserve the WebApp index of existence in the buffer unit 112 and the resource that each WebApp comprises in the present embodiment, and identify WebApp with the primary resource URL of WebApp as keyword, the inner resource of using of each WebApp uses its corresponding URL to be distinguished, and has also preserved the position of all resources in buffer unit 112 simultaneously.Therefore, buffer unit 112 is finished WebApp resource Cache behind this locality, comes in addition index by Database Unit 111, the resource that inquiry needs when being used for loading unit 12 and loading WebApp.
Load-on module 12 is used for loading the resource of current Web APP, and elder generation judges whether the resource of current Web APP is preserved to local by Cache before loading, if, the resource of loading current Web APP from all resources that described memory module 11 is preserved; If not, network loads the resource of current Web APP, and calls described memory module 11, and the resource Cache of current Web APP is preserved to local.
In the present embodiment, load-on module 12 loads when being arrived the resource of the local current Web APP that preserves by Cache, with the URL of current Web App primary resource as keyword, from Database Unit 111, find out the position that current Web App is buffered in all resources of buffer unit 112, then according to the resource that loads as required in the HTML resolving in the buffer unit 112; When load-on module 12 loads the resource of current Web APP by network HTTP, call all resources that memory module 11 storage current Web App have downloaded in buffer unit 112, and the carrying out of resolving along with HTML, continue the follow-up resource of storage in buffer unit 112, Database Unit 111 is labelled and index for the current Web App resource that stores in the buffer unit 112.
Update module 13 is after the resource of described load-on module loading current Web APP finishes, and the resource of the described current Web APP of background update is in described memory module.
In the present embodiment, described update module 13 is obtained the URL of its all resources according to the URL of WebApp primary resource, by the http agreement one by one with buffer unit 112 in resource contrast, if existence is upgraded then is replaced current resource, and all resources all upgrade finish after, notify described current Web App user can select to switch to new WebApp environment with the form of JavaScript event.
Accordingly, as shown in Figure 2, the present invention also provides a kind of WebAPP dynamic off line storage means, may further comprise the steps.
S21, described memory module 11 is preserved the resource Cache of each WebAPP that the user visited to local;
S22 starts current Web APP;
S23, described load-on module judge whether the resource of current Web APP is preserved to local by Cache, if carry out S24; If not, carry out S25 to S26;
S24, the resource of loading current Web APP from all resources that described memory module is preserved;
S25, network loads the resource of current Web APP;
S26 calls described memory module, and the resource Cache of current Web APP is preserved to local;
S27, the resource that described load-on module loads current Web APP finishes;
S28, the resource of the described current Web APP of described update module background update is in described memory module.
Among this implementation step S21, memory module 11 comprises Database Unit 111 and buffer unit 112, described buffer unit 112 arrives the resource Cache of each WebAPP that the user visited local, and the resource of preserving described each WebAPP with file mode, the http response message of also preserving described each WebAPP simultaneously; Described Database Unit 111 employing URL identify resource and the position in described buffer unit thereof of each WebAPP, set up the index information of each WebAPP.
Among this implementation step S24, load-on module 12 loads URL with current Web App primary resource as keyword, from Database Unit 111, find out the position that current Web App is buffered in all resources of buffer unit 112, then according to the resource that loads as required in the HTML resolving in the buffer unit 112.
Among this implementation step S25, load-on module 12 loads the resource of current Web APP by network HTTP, call all resources that memory module 11 storage current Web App have downloaded among the step S26 in buffer unit 112, and the carrying out of resolving along with HTML, continue the follow-up resource of storage in buffer unit 112, Database Unit 111 is labelled and index for the current Web App resource that stores in the buffer unit 112.
In sum, the dynamic off line storage system of WebAPP provided by the invention and method, the resource Cache of each WebAPP that the user was visited by memory module preserves to local, load the not WebAPP resource of Cache storage by the existing WebAPP resource in the load-on module off line load store module or network then, pass through the resource of the WebAPP in the update module updated stored module again, the automatic Cache of WebAPP resource of user's visit can be arrived local, to guarantee that the user also can use this WebAPP under off-line case, can realize the seamless switching of WebApp off-line and online mode, be applicable to all kinds of WebAPP that support that off-line is used.
Obviously, those skilled in the art can carry out various changes and modification to invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.

Claims (10)

1. the dynamic off line storage system of WebAPP is characterized in that, comprising:
Memory module, the resource Cache that is used for each WebAPP that the user was visited preserves to local;
Load-on module, for the resource that loads current Web APP, elder generation judges whether the resource of current Web APP is arrived local the preservation by Cache before loading, if, the resource of loading current Web APP from all resources that described memory module is preserved; If not, network loads the resource of current Web APP, and calls described memory module, and the resource Cache of current Web APP is preserved to local;
Update module is used for after the resource of described load-on module loading current Web APP finishes, and the resource of the described current Web APP of background update is in described memory module.
2. the dynamic off line storage system of WebAPP as claimed in claim 1, it is characterized in that, described memory module comprises Database Unit and buffer unit, and the resource Cache that described buffer unit is used for each WebAPP that the user was visited is to this locality and the resource of preserving described each WebAPP; Described Database Unit is used for the resource of each WebAPP of sign and in the position of described buffer unit, sets up the index information of each WebAPP.
3. the dynamic off line storage system of WebAPP as claimed in claim 2, it is characterized in that, described Database Unit adopts the SQLITE3 database, the URL of the resource of each WebAPP is identified resource and the position in described buffer unit thereof of each WebAPP as keyword.
4. the dynamic off line storage system of WebAPP as claimed in claim 2 is characterized in that, the resource that described buffer unit is preserved described each WebAPP with file mode, the http response message of also preserving described each WebAPP simultaneously.
5. the dynamic off line storage system of WebAPP as claimed in claim 1, it is characterized in that, described update module is upgraded the resource of described current Web APP one by one in described memory module by the http agreement, and after renewal is finished, notify described current Web App to switch to new WebApp environment with the form of JavaScript event.
6. the dynamic off line storage means of WebAPP is characterized in that, comprising:
Described memory module is preserved the resource Cache of each WebAPP that the user visited to local;
Startup current Web APP, described load-on module judge whether the resource of current Web APP is preserved to local by Cache, if, the resource of loading current Web APP from all resources that described memory module is preserved; If not, network loads the resource of current Web APP, and calls described memory module, and the resource Cache of current Web APP is preserved to local;
After the resource of described load-on module loading current Web APP finished, the resource of the described current Web APP of described update module background update was in described memory module.
7. the dynamic off line storage means of WebAPP as claimed in claim 6, it is characterized in that, described memory module comprises Database Unit and buffer unit, and the resource Cache that described buffer unit is used for each WebAPP that the user was visited is to this locality and the resource of preserving described each WebAPP; Described Database Unit is used for the resource of each WebAPP of sign and in the position of described buffer unit, sets up the index information of each WebAPP.
8. the dynamic off line storage means of WebAPP as claimed in claim 7, it is characterized in that, described Database Unit adopts the SQLITE3 database, the URL of the resource of each WebAPP is identified resource and the position in described buffer unit thereof of each WebAPP as keyword.
9. the dynamic off line storage means of WebAPP as claimed in claim 7 is characterized in that, the resource that described buffer unit is preserved described each WebAPP with file mode, the http response message of also preserving described each WebAPP simultaneously.
10. the dynamic off line storage means of WebAPP as claimed in claim 6, it is characterized in that, described update module is upgraded the resource of described current Web APP one by one in described memory module by the http agreement, and after renewal is finished, notify described current Web App to switch to new WebApp environment with the form of JavaScript event.
CN 201110454133 2011-12-29 2011-12-29 WebAPP dynamic offline memory system and method Pending CN103186594A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110454133 CN103186594A (en) 2011-12-29 2011-12-29 WebAPP dynamic offline memory system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110454133 CN103186594A (en) 2011-12-29 2011-12-29 WebAPP dynamic offline memory system and method

Publications (1)

Publication Number Publication Date
CN103186594A true CN103186594A (en) 2013-07-03

Family

ID=48677763

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110454133 Pending CN103186594A (en) 2011-12-29 2011-12-29 WebAPP dynamic offline memory system and method

Country Status (1)

Country Link
CN (1) CN103186594A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104601691A (en) * 2015-01-13 2015-05-06 北京中交兴路车联网科技有限公司 Method and system for increasing loading speed of Web site resource
CN104765622A (en) * 2014-01-03 2015-07-08 腾讯科技(深圳)有限公司 Page resource loading method and device
WO2015180601A1 (en) * 2014-05-30 2015-12-03 阿里巴巴集团控股有限公司 Method and device for starting operation of webapp and generating mirror image file
CN107968812A (en) * 2016-10-20 2018-04-27 法乐第(北京)网络科技有限公司 The method and device of synchronous local resource and Internet resources
CN107968807A (en) * 2016-10-20 2018-04-27 法乐第(北京)网络科技有限公司 Automatically update the method and device of local cache resource
CN108132814A (en) * 2017-12-22 2018-06-08 平安养老保险股份有限公司 Page loading method, device, computer equipment and the storage medium of application program
CN108600382A (en) * 2018-04-28 2018-09-28 广州联欣信息科技有限公司 A kind of method and computer readable storage medium of the APP content cachings in internet off-line
CN109922368A (en) * 2019-02-18 2019-06-21 青岛海信电器股份有限公司 A kind of image display method and smart television based on Webpage
CN110209980A (en) * 2019-04-24 2019-09-06 深圳点猫科技有限公司 The offline methods availalbe of webapp and electronic equipment based on teaching platform

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104765622A (en) * 2014-01-03 2015-07-08 腾讯科技(深圳)有限公司 Page resource loading method and device
CN104765622B (en) * 2014-01-03 2019-12-27 腾讯科技(深圳)有限公司 Page resource loading method and device
CN105446750B (en) * 2014-05-30 2019-12-03 阿里巴巴集团控股有限公司 The method and apparatus that WebApp starting runs, generates image file
WO2015180601A1 (en) * 2014-05-30 2015-12-03 阿里巴巴集团控股有限公司 Method and device for starting operation of webapp and generating mirror image file
CN105446750A (en) * 2014-05-30 2016-03-30 阿里巴巴集团控股有限公司 Web app starting operation and mirror image file generating method and device
CN104601691A (en) * 2015-01-13 2015-05-06 北京中交兴路车联网科技有限公司 Method and system for increasing loading speed of Web site resource
CN107968812A (en) * 2016-10-20 2018-04-27 法乐第(北京)网络科技有限公司 The method and device of synchronous local resource and Internet resources
CN107968807A (en) * 2016-10-20 2018-04-27 法乐第(北京)网络科技有限公司 Automatically update the method and device of local cache resource
CN108132814A (en) * 2017-12-22 2018-06-08 平安养老保险股份有限公司 Page loading method, device, computer equipment and the storage medium of application program
CN108600382A (en) * 2018-04-28 2018-09-28 广州联欣信息科技有限公司 A kind of method and computer readable storage medium of the APP content cachings in internet off-line
CN109922368A (en) * 2019-02-18 2019-06-21 青岛海信电器股份有限公司 A kind of image display method and smart television based on Webpage
CN109922368B (en) * 2019-02-18 2021-09-21 海信视像科技股份有限公司 Picture display method based on webpage and smart television
CN110209980A (en) * 2019-04-24 2019-09-06 深圳点猫科技有限公司 The offline methods availalbe of webapp and electronic equipment based on teaching platform

Similar Documents

Publication Publication Date Title
CN103186594A (en) WebAPP dynamic offline memory system and method
EP2916243B1 (en) Method, apparatus, server and system for implementing web application
CN101147145B (en) Embedded web-based management method
US10198527B2 (en) Graphical user interface machine to present a window
CN106446174A (en) Method for page loading in application
CN102789469A (en) Page updating method and system
CN101799821B (en) Method and system for realizing webpage application by widget
CN106294658A (en) The quick methods of exhibiting of webpage and device
CN104657118A (en) Native + Web mixed mobile application achieving method and device
US9292252B2 (en) Methods and apparatus for voiced-enabling a web application
CN104113567A (en) Content distribution network data processing method, device and system
CN105912689A (en) Website display method, apparatus and system
CN111651703A (en) Page jump method and device, electronic equipment and readable storage medium
CN103634393A (en) IVR (interactive voice response) and realization method thereof
CN104052769A (en) Method, apparatus and system for updating resources contained by mobile terminal application
CN102411566A (en) Positioning-information-based translation system and method
CN102156697A (en) Method and terminal equipment for realizing webpage application through widget
US10095791B2 (en) Information search method and apparatus
CN103258055A (en) Device and method for file downloading
CN102523271B (en) Terminal and communication method and system thereof
CN102156696A (en) Web application oriented local widget management method and terminal equipment
CN102752401B (en) Content acquisition method and device
CN112597423B (en) Webpage content display method, terminal and server
US10069925B2 (en) Server device and information processing method
CN109840156B (en) Data caching method and equipment, storage medium and terminal thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C05 Deemed withdrawal (patent law before 1993)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20130703