CN105786844A - Page data acquiring method and device - Google Patents

Page data acquiring method and device Download PDF

Info

Publication number
CN105786844A
CN105786844A CN201410810771.7A CN201410810771A CN105786844A CN 105786844 A CN105786844 A CN 105786844A CN 201410810771 A CN201410810771 A CN 201410810771A CN 105786844 A CN105786844 A CN 105786844A
Authority
CN
China
Prior art keywords
page data
buffer memory
page
current browser
data
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
CN201410810771.7A
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.)
Kingdee Software China Co Ltd
Original Assignee
Kingdee Software China 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 Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CN201410810771.7A priority Critical patent/CN105786844A/en
Publication of CN105786844A publication Critical patent/CN105786844A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a page data acquiring method, comprising the following steps of after receiving a page data request, determining page data to be displayed corresponding to the page data request, and judging that whether a current browser supports database caching; when the current browser supports the database caching, judging that whether the database of the current browser caches the page data to be displayed; and when the database of the current browser caches the page data to be displayed, acquiring the page data to be displayed from the database of the current browser and displaying on the current page. The invention also discloses a page data acquiring device. According to the method and device, the page data acquiring efficiency and experience are improved.

Description

Page data acquisition methods and device
Technical field
The present invention relates to technical field of data processing, particularly relate to page data acquisition methods and device.
Background technology
Along with the development of information technology, increasing user likes browsing information by browser.When user asks browsing data, it is necessary to typing search terms or by the control of browser page (information control, for instance, the control such as physical culture, news) enter corresponding data interface and browse data corresponding to search terms or data corresponding to control.Under the mode of typing search terms, user is after typing search terms (such as company's coding or title), need to send http request to server, service end-apparatus, according to search terms searching database, finds the data mated with search terms to return to browser current page and shows that also Select input is to data control.
User, when requests for page data, all needs typing search terms every time and sends request of data data that server is retrieved to server after typing search terms and beam back browser page again.Page data cannot be got from server in time when network is very poor under this mode to show, cause that page data obtains efficiency and experiences on the low side.
Foregoing is only used for assisting understanding technical scheme, does not represent and admits that foregoing is prior art.
Summary of the invention
A kind of page data acquisition methods of offer and device are provided, aim to solve the problem that cannot get page data from server in time when network is very poor under existing page data acquisition mode shows, cause that page data obtains efficiency and experiences problem on the low side.
For achieving the above object, the present invention provides a kind of page data acquisition methods, comprises the following steps:
After receiving page data request, it is determined that the page data to be shown that described page data request is corresponding, and judge whether current browser supports database caches;
When current browser supports database caches, it is judged that page data to be shown described in the data base of current browser whether buffer memory;
When page data to be shown described in the database caches of current browser, from the data base of current browser, obtain described page data to be shown and show at current page.
Preferably, described judge the step whether current browser supports database caches after, also include:
When current browser does not support database caches, it is judged that whether current browser supports LocalStorage buffer memory;
When current browser supports LocalStorage buffer memory, it is judged that whether page data to be shown described in buffer memory in LocalStorage buffer memory;
In LocalStorage buffer memory described in buffer memory during page data to be shown, from described LocalStorage buffer memory, obtain described page data to be shown and show at current page.
Preferably, described judge the step whether current browser supports LocalStorage buffer memory after, also include:
When current browser does not support LocalStorage buffer memory, it is judged that whether current browser supports page cache;
When current browser supports page cache, it is judged that whether page data to be shown described in buffer memory in page cache;
In page cache described in buffer memory during page data to be shown, from described page cache, obtain described page data to be shown and show at current page.
Preferably, described page data acquisition methods also includes:
During the uncached described page data to be shown of data base at current browser, or in the LocalStorage buffer memory of current browser during uncached described page data to be shown, or when current browser does not support page cache, or in the page cache of current browser during uncached described page data to be shown, obtain described page data to be shown from described server and show;
By in described page data buffer memory to be shown to database caches.
Preferably, described after step in described page data buffer memory to be shown to database caches, also will include:
Obtain the version number of the page data of buffer memory in described database caches, and described version number is sent to server, for whether version number described in server analysis is latest edition number;
Receive the page data of the latest edition number that server returns, and the page data of described latest edition number is associated buffer memory in the database with described latest edition number.
Additionally, for achieving the above object, the present invention furthermore provides a kind of page data acquisition device, including:
Determine module, for after receiving page data request, it is determined that the page data to be shown that described page data request is corresponding;
Judge module, is used for judging whether current browser supports database caches;It is additionally operable to when current browser supports database caches, it is judged that page data to be shown described in the data base of current browser whether buffer memory;
Acquisition module, for when page data to be shown described in the database caches of current browser, obtaining described page data to be shown from the data base of current browser;
Display module, for showing described page data to be shown at current page.
Preferably, described judge module, it is additionally operable to when current browser does not support database caches, it is judged that whether current browser supports LocalStorage buffer memory;It is additionally operable to when current browser supports LocalStorage buffer memory, it is judged that whether page data to be shown described in buffer memory in LocalStorage buffer memory;
Described acquisition module, is additionally operable in LocalStorage buffer memory described in buffer memory during page data to be shown, obtains described page data to be shown from described LocalStorage buffer memory.
Preferably, described judge module, it is additionally operable to when current browser does not support LocalStorage buffer memory, it is judged that whether current browser supports page cache;It is additionally operable to when current browser supports page cache, it is judged that whether page data to be shown described in buffer memory in page cache;
Described acquisition module, is additionally operable in page cache described in buffer memory during page data to be shown, obtains described page data to be shown from described page cache.
Preferably, described page data acquisition device also includes cache module,
Described acquisition module, when being additionally operable to the uncached described page data to be shown of the data base at current browser, or in the LocalStorage buffer memory of current browser during uncached described page data to be shown, or when current browser does not support page cache, or in the page cache of current browser during uncached described page data to be shown, obtain described page data to be shown from described server and show;
Cache module, for by described page data buffer memory to be shown to database caches.
Preferably, described page data acquisition device also includes sending and receiving module,
Described acquisition module, is additionally operable to obtain the version number of the page data of buffer memory in described database caches;
Sending and receiving module, for sending described version number to server, for whether version number described in server analysis is latest edition number;It is additionally operable to receive the page data of the latest edition number that server returns;
Described cache module, is additionally operable to the page data of described latest edition number is associated buffer memory in the database with described latest edition number.
The present invention is by by database caches local for page data buffer memory to browser so that need not often secondary data request time all need to server request page data.It is prevented effectively from when network environment difference, it is impossible to get data from server in time and show, causes that page data obtains efficiency and experiences problem on the low side.It is effectively ensured and gets page data from server in time when network is very poor and show, improve page data and obtain efficiency and experience.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of the first embodiment of page data acquisition methods of the present invention;
Fig. 2 is the schematic flow sheet of the second embodiment of page data acquisition methods of the present invention;
Fig. 3 is the schematic flow sheet of the 3rd embodiment of page data acquisition methods of the present invention;
Fig. 4 is the schematic flow sheet of the 4th embodiment of page data acquisition methods of the present invention;
Fig. 5 is the schematic flow sheet of the 5th embodiment of page data acquisition methods of the present invention;
Fig. 6 is the high-level schematic functional block diagram of the first embodiment of page data acquisition device of the present invention;
Fig. 7 is the high-level schematic functional block diagram of the second embodiment of page data acquisition device of the present invention;
Fig. 8 is the high-level schematic functional block diagram of the 3rd embodiment of page data acquisition device of the present invention.
The realization of the object of the invention, functional characteristics and advantage will in conjunction with the embodiments, are described further with reference to accompanying drawing.
Detailed description of the invention
Should be appreciated that specific embodiment described herein is only in order to explain the present invention, is not intended to limit the present invention.
The primary solutions of the embodiment of the present invention is: after receiving page data request, it is determined that the page data to be shown that described page data request is corresponding, and judges whether current browser supports database caches;When current browser supports database caches, it is judged that page data to be shown described in the data base of current browser whether buffer memory;When page data to be shown described in the database caches of current browser, from the data base of current browser, obtain described page data to be shown and show at current page.By by database caches local for page data buffer memory to browser so that need not often secondary data request time all need to server request page data.It is prevented effectively from when network environment difference, it is impossible to get data from server in time and show, causes that page data obtains efficiency and experiences problem on the low side.It is effectively ensured and gets page data from server in time when network is very poor and show, improve page data and obtain efficiency and experience.
Need every time all typing search terms owing to page data obtains mode and after typing search terms, send, to server, the data that request of data retrieves server beam back browser page again.Page data cannot be got from server in time when network is very poor under this mode to show, cause that page data obtains efficiency and experiences on the low side.
Based on the problems referred to above, the present invention provides a kind of page data acquisition methods.
Schematic flow sheet with reference to the first embodiment that Fig. 1, Fig. 1 are page data acquisition methods of the present invention.
In one embodiment, described page data acquisition methods includes:
Step S10, after receiving page data request, it is determined that the page data to be shown that described page data request is corresponding, and judges whether current browser supports database caches;
Perform the main body of page data acquisition methods of the present invention can be terminal (such as, mobile phone, notebook computer, pad etc.), further for loading the browser (such as, IE browser, Chrome browser, Firefox browser etc.) in described terminal.It is preferably browser at the present embodiment.
User is when needs access data, open browser, and the search terms of data is needed to access in search terms typing region typing, after typing search terms, and click search control, and representing and send page data request, described browser receives page data request, after receiving page data request, it is determined that the page data to be shown that described page data request is corresponding.In other embodiments of the present invention, described browser determines that page data to be shown corresponding to described page data request also can also is that after judging the process whether current browser supports database caches, and before judging page data to be shown described in data base's whether buffer memory of current browser.Described data base is the system that can retrieve and store mass data, namely has enough memory spaces to store substantial amounts of page data.
The buffer memory that each browser is supported is different, such as, Firefox supports IndexedDB data base, and WebSQL data base supported by Chrome, safari, Opera browser, can store mass data, can be used for the buffer memory of the big page data of data volume, major browsers HTML4 supports LocalStorage buffer memory, can be used for the page data buffer memory that data volume is less, if do not supported above, data volume is less and through conventional page data, can directly buffer memory to current page.Described browser is when receiving page data request, it is judged that whether current browser supports database caches.
Step S20, when current browser supports database caches, it is judged that page data to be shown described in the data base of current browser whether buffer memory;
In the data base of described browser, the page data of buffer memory is the page data that user often accesses, and the database caches of browser supports the buffer memory of the bigger page data of data volume.Further, the data of the frequent typing of described user can typing to control, such as, in typing F7 control, with the data of typing frequent described in the form buffer memory of major key, when focus is moved to control, automatically obtaining logging data from the buffer memory of browser for user's Select input, in control, the data of buffer memory can embody in the form of a list, and described list can at the predeterminated position of current page, such as, at the position, the upper right corner of current page or upper left position etc..
When current browser supports database caches, representing that described page data to be shown is likely to be buffered in described database caches, described browser judges page data to be shown described in data base's whether buffer memory of current browser.Described browser judges that described in data base's whether buffer memory of current browser, the process of page data to be shown may is that described browser extracts the keyword in described page data to be shown, described database caches is searched for described keyword, when searching described keyword, it is judged that page data to be shown described in the database caches of current browser;When not searching described keyword, it is judged that the uncached described page data to be shown of data base of current browser.Also can also is that, described browser is that each page data arranges mark, extract the mark of described page data to be shown, when searching the mark of described page data to be shown in the database, it is judged that page data to be shown described in the database caches of current browser;When not searching the mark of described page data to be shown, it is judged that the uncached described page data to be shown of data base of current browser.Also it is also possible that described browser travels through all page datas of buffer memory in the data base of described browser, when there being the page data consistent with described page data to be shown, it is judged that page data to be shown described in the database caches of current browser;When not consistent with described page data to be shown page data, it is judged that the uncached described page data to be shown of data base of current browser.In other embodiments of the present invention, other modes also can also be adopted to judge page data to be shown described in data base's whether buffer memory of described browser.
Step S30, when page data to be shown described in the database caches of current browser, obtains described page data to be shown from the data base of current browser and shows at current page.
When page data to be shown described in the database caches of current browser, namely described page data to be shown is at local cache, and described browser is without obtaining described page data to be shown from server;From the data base of current browser, obtain described page data to be shown and show at current page.
The present embodiment is by by database caches local for page data buffer memory to browser so that need not often secondary data request time all need to server request page data.It is prevented effectively from when network environment difference, it is impossible to get data from server in time and show, causes that page data obtains efficiency and experiences problem on the low side.It is effectively ensured and gets page data from server in time when network is very poor and show, improve page data and obtain efficiency and experience.
Schematic flow sheet with reference to the second embodiment that Fig. 2, Fig. 2 are page data acquisition methods of the present invention.Based on the first embodiment of above-mentioned page data acquisition methods, after described step S10, also include:
Step S40, when current browser does not support database caches, it is judged that whether current browser supports LocalStorage (not by time restriction) buffer memory;
When current browser does not support database caches, illustrating that current browser is absent from database caches page data, described browser judges whether current browser supports LocalStorage buffer memory.Described LocalStorage buffer memory provides the buffer memory of the page data that data volume is less.
Step S50, when current browser supports LocalStorage buffer memory, it is judged that whether page data to be shown described in buffer memory in LocalStorage buffer memory;
When current browser supports LocalStorage buffer memory, illustrating that described page data to be shown is likely to be buffered in described LocalStorage buffer memory, described browser judges in LocalStorage buffer memory whether page data to be shown described in buffer memory.Described browser judges in LocalStorage buffer memory the process of page data to be shown described in whether buffer memory, and the process of page data to be shown described in buffer memory is identical with the data base judging browser, does not repeat them here.
Step S60, in LocalStorage buffer memory described in buffer memory during page data to be shown, obtains described page data to be shown from described LocalStorage buffer memory and shows at current page.
In the LocalStorage buffer memory of current browser described in buffer memory during page data to be shown, namely described page data to be shown is at local cache, and described browser is without obtaining described page data to be shown from server;From the LocalStorage buffer memory of current browser, obtain described page data to be shown and show at current page.
The present embodiment is not by when current browser supports database caches, judge whether current browser supports LocalStorage buffer memory, and by page data being buffered in LocalStorage buffer memory so that need not often secondary data request be both needed to will to server request page data.It is prevented effectively from when network environment difference, it is impossible to get data from server in time and show, causes that page data obtains efficiency and experiences problem on the low side.It is effectively ensured and gets page data from server in time when network is very poor and show, improve page data and obtain efficiency and experience.
Schematic flow sheet with reference to the 3rd embodiment that Fig. 3, Fig. 3 are page data acquisition methods of the present invention.Based on the second embodiment of above-mentioned page data acquisition methods, after described step S40, also include:
Step S70, when current browser does not support LocalStorage buffer memory, it is judged that whether current browser supports page cache;
When current browser does not support LocalStorage buffer memory, illustrating that current browser is absent from LocalStorage buffer memory page data, described browser judges whether current browser supports page cache.Described page cache provides the buffer memory of the page data that data volume is less.
Step S80, when current browser supports page cache, it is judged that whether page data to be shown described in buffer memory in page cache;
When current browser supports page cache, illustrating that described page data to be shown is likely to be buffered in described page cache, described browser judges in page cache whether page data to be shown described in buffer memory.Described browser judges in page cache the process of page data to be shown described in whether buffer memory, and the process of page data to be shown described in buffer memory is identical with the data base judging browser, does not repeat them here.
Step S90, in page cache described in buffer memory during page data to be shown, obtains described page data to be shown from described page cache and shows at current page.
In the page cache of current browser described in buffer memory during page data to be shown, namely described page data to be shown is at local cache, and described browser is without obtaining described page data to be shown from server;From the page cache of current browser, obtain described page data to be shown and show at current page.
The buffer memory that current browser is supported can also be obtained in other embodiments of the present invention, for instance, support database caches, support LocalStorage buffer memory and or page cache.When obtaining the buffer memory playing current browser support, described browser judges in the buffer memory that current browser is supported if so, then to obtain the whether page to be shown described in buffer memory the described page to be shown from the buffer memory of current browser support and to show at current page.
When the present embodiment is not by supporting database caches and LocalStorage buffer memory at current browser, judge whether current browser supports page cache, and by page data is buffered in page cache so that need not often secondary data request be both needed to will to server request page data.It is prevented effectively from when network environment difference, it is impossible to get data from server in time and show, causes that page data obtains efficiency and experiences problem on the low side.It is effectively ensured and gets page data from server in time when network is very poor and show, improve page data and obtain efficiency and experience.
Schematic flow sheet with reference to the 4th embodiment that Fig. 4, Fig. 4 are page data acquisition methods of the present invention.Based on the 3rd embodiment of above-mentioned page data acquisition methods, described data capture method also includes:
Step S100, during the uncached described page data to be shown of data base at current browser, or in the LocalStorage buffer memory of current browser during uncached described page data to be shown, or when current browser does not support page cache, or in the page cache of current browser during uncached described page data to be shown, obtain described page data to be shown from described server and show;
When current browser does not support buffer memory, or in the buffer memory that current browser is supported during uncached described data to be displayed, described browser sends page data to server and obtains request, obtains described page data to be shown from described server.After getting described page data to be shown from described server, described page data to be shown is shown by described browser at current page.
Step S110, in the buffer memory support described page data buffer memory to be shown to current browser.
After getting described page data to be shown from described server, in the buffer memory that described data to be displayed buffer memory to current browser is supported by described browser, for instance, buffer memory is to database caches, in LocalStorage buffer memory or in page cache.Preferably, it is judged that whether described page data to be shown is the page data often accessed, if so, then by described page data buffer memory to be shown to database caches;If it is not, in the buffer memory then described page data buffer memory to be shown to current browser not supported.
The present embodiment is not when current browser supports buffer memory, or in the buffer memory that current browser is supported during uncached described data to be displayed, in the buffer memory that described data to be displayed buffer memory to the current browser obtained from server is supported, when accessing described page data to be shown for next time, directly obtain from browser this locality, reduce the acquisition flow process of page data, improve page data and obtain efficiency.
Schematic flow sheet with reference to the 5th embodiment that Fig. 5, Fig. 5 are page data acquisition methods of the present invention.Based on the 4th embodiment of above-mentioned page data acquisition methods, after described step S110, also include:
Step S120, obtains the version number of the page data of buffer memory in described database caches, and sends described version number to server, for whether version number described in server analysis is latest edition number;
Each page data is respectively provided with a version number, the up-to-date version number of version number and the server of the page data of browser rs cache always time, illustrate that described page data is up-to-date page data, if when the version number of page data of browser rs cache is lower than the version number of the page data of server, it is necessary to update the page data of browser rs cache.Whether the version number of the page data of browser rs cache is sent to server by described browser every Preset Time (10 minutes or 20 minutes etc.), be up-to-date version number for version number described in server analysis.Described server, when described version number is not latest edition, returns the page data of latest edition number to described browser.
Step S130, receives the page data of the latest edition number that server returns, and the page data of described latest edition number is associated buffer memory in the database with described latest edition number.
Described browser receives the page data of the latest edition number that server returns, and after the page data receiving the latest edition number that described server returns, described latest edition page data is associated buffer memory in the database with described latest edition number, with update described browser end page data for up-to-date.
The present embodiment is by constantly sending the version number of the page data of browser local cache to server, it it is whether up-to-date version number for version number described in server analysis, when not being up-to-date, server issues the page data of latest edition number to browser, and browser updates local page data according to the page data received.The page data being effectively ensured browser local is up-to-date page data, improves the Experience Degree that page data accesses.
Corresponding, the present invention furthermore provides a kind of page data acquisition device.
High-level schematic functional block diagram with reference to the first embodiment that Fig. 6, Fig. 6 are page data acquisition device of the present invention.
In one embodiment, described page data acquisition device comprises determining that module 10, judge module 20, acquisition module 30 and display module 40.
Described determine module 10, for after receiving page data request, it is determined that the page data to be shown that described page data request is corresponding;
Described judge module 2,0, is used for judging whether current browser supports database caches;
User is when needs access data, open browser, and the search terms of data is needed to access in search terms typing region typing, after typing search terms, and click search control, and representing and send page data request, described browser receives page data request, after receiving page data request, it is determined that the page data to be shown that described page data request is corresponding.In other embodiments of the present invention, described browser determines that page data to be shown corresponding to described page data request also can also is that after judging the process whether current browser supports database caches, and before judging page data to be shown described in data base's whether buffer memory of current browser.Described data base is the system that can retrieve and store mass data, namely has enough memory spaces to store substantial amounts of page data.
The buffer memory that each browser is supported is different, such as, Firefox supports IndexedDB data base, and WebSQL data base supported by Chrome, safari, Opera browser, can store mass data, can be used for the buffer memory of the big page data of data volume, major browsers HTML4 supports LocalStorage buffer memory, can be used for the page data buffer memory that data volume is less, if do not supported above, data volume is less and through conventional page data, can directly buffer memory to current page.Described browser is when receiving page data request, it is judged that whether current browser supports database caches.
Described judge module 20, is additionally operable to when current browser supports database caches, it is judged that page data to be shown described in the data base of current browser whether buffer memory;
In the data base of described browser, the page data of buffer memory is the page data that user often accesses, and the database caches of browser supports the buffer memory of the bigger page data of data volume.Further, the data of the frequent typing of described user can typing to control, such as, in typing F7 control, with the data of typing frequent described in the form buffer memory of major key, when focus is moved to control, automatically obtaining logging data from the buffer memory of browser for user's Select input, in control, the data of buffer memory can embody in the form of a list, and described list can at the predeterminated position of current page, such as, at the position, the upper right corner of current page or upper left position etc..
When current browser supports database caches, representing that described page data to be shown is likely to be buffered in described database caches, described browser judges page data to be shown described in data base's whether buffer memory of current browser.Described browser judges that described in data base's whether buffer memory of current browser, the process of page data to be shown may is that described browser extracts the keyword in described page data to be shown, described database caches is searched for described keyword, when searching described keyword, it is judged that page data to be shown described in the database caches of current browser;When not searching described keyword, it is judged that the uncached described page data to be shown of data base of current browser.Also can also is that, described browser is that each page data arranges mark, extract the mark of described page data to be shown, when searching the mark of described page data to be shown in the database, it is judged that page data to be shown described in the database caches of current browser;When not searching the mark of described page data to be shown, it is judged that the uncached described page data to be shown of data base of current browser.Also it is also possible that described browser travels through all page datas of buffer memory in the data base of described browser, when there being the page data consistent with described page data to be shown, it is judged that page data to be shown described in the database caches of current browser;When not consistent with described page data to be shown page data, it is judged that the uncached described page data to be shown of data base of current browser.In other embodiments of the present invention, other modes also can also be adopted to judge page data to be shown described in data base's whether buffer memory of described browser.
Described acquisition module 30, for when page data to be shown described in the database caches of current browser, obtaining described page data to be shown from the data base of current browser;
Described display module 40, for showing described data to be displayed at current page.
When page data to be shown described in the database caches of current browser, namely described page data to be shown is at local cache, and described browser is without obtaining described page data to be shown from server;From the data base of current browser, obtain described page data to be shown and show at current page.
The present embodiment is by by database caches local for page data buffer memory to browser so that need not often secondary data request time all need to server request page data.It is prevented effectively from when network environment difference, it is impossible to get data from server in time and show, causes that page data obtains efficiency and experiences problem on the low side.It is effectively ensured and gets page data from server in time when network is very poor and show, improve page data and obtain efficiency and experience.
Further, described judge module 20, it is additionally operable to when current browser does not support database caches, it is judged that whether current browser supports LocalStorage buffer memory;
When current browser does not support database caches, illustrating that current browser is absent from database caches page data, described browser judges whether current browser supports LocalStorage buffer memory.Described LocalStorage buffer memory provides the buffer memory of the page data that data volume is less.
Described judge module 20, is additionally operable to when current browser supports LocalStorage buffer memory, it is judged that whether page data to be shown described in buffer memory in LocalStorage buffer memory;
When current browser supports LocalStorage buffer memory, illustrating that described page data to be shown is likely to be buffered in described LocalStorage buffer memory, described browser judges in LocalStorage buffer memory whether page data to be shown described in buffer memory.Described browser judges in LocalStorage buffer memory the process of page data to be shown described in whether buffer memory, and the process of page data to be shown described in buffer memory is identical with the data base judging browser, does not repeat them here.
Described acquisition module 30, is additionally operable in LocalStorage buffer memory described in buffer memory during page data to be shown, obtains described page data to be shown from described LocalStorage buffer memory.
In the LocalStorage buffer memory of current browser described in buffer memory during page data to be shown, namely described page data to be shown is at local cache, and described browser is without obtaining described page data to be shown from server;From the LocalStorage buffer memory of current browser, obtain described page data to be shown and show at current page.
The present embodiment is not by when current browser supports database caches, judge whether current browser supports LocalStorage buffer memory, and by page data being buffered in LocalStorage buffer memory so that need not often secondary data request be both needed to will to server request page data.It is prevented effectively from when network environment difference, it is impossible to get data from server in time and show, causes that page data obtains efficiency and experiences problem on the low side.It is effectively ensured and gets page data from server in time when network is very poor and show, improve page data and obtain efficiency and experience.
Further, described judge module 20, it is additionally operable to when current browser does not support LocalStorage buffer memory, it is judged that whether current browser supports page cache;
When current browser does not support LocalStorage buffer memory, illustrating that current browser is absent from LocalStorage buffer memory page data, described browser judges whether current browser supports page cache.Described page cache provides the buffer memory of the page data that data volume is less.
Described judge module 20, is additionally operable to when current browser supports page cache, it is judged that whether page data to be shown described in buffer memory in page cache;
When current browser supports page cache, illustrating that described page data to be shown is likely to be buffered in described page cache, described browser judges in page cache whether page data to be shown described in buffer memory.Described browser judges in page cache the process of page data to be shown described in whether buffer memory, and the process of page data to be shown described in buffer memory is identical with the data base judging browser, does not repeat them here.
Described acquisition module 30, is additionally operable in page cache described in buffer memory during page data to be shown, obtains described page data to be shown from described page cache.
In the page cache of current browser described in buffer memory during page data to be shown, namely described page data to be shown is at local cache, and described browser is without obtaining described page data to be shown from server;From the page cache of current browser, obtain described page data to be shown and show at current page.
The buffer memory that current browser is supported can also be obtained in other embodiments of the present invention, for instance, support database caches, support LocalStorage buffer memory and or page cache.When obtaining the buffer memory playing current browser support, described browser judges in the buffer memory that current browser is supported if so, then to obtain the whether page to be shown described in buffer memory the described page to be shown from the buffer memory of current browser support and to show at current page.
When the present embodiment is not by supporting database caches and LocalStorage buffer memory at current browser, judge whether current browser supports page cache, and by page data is buffered in page cache so that need not often secondary data request be both needed to will to server request page data.It is prevented effectively from when network environment difference, it is impossible to get data from server in time and show, causes that page data obtains efficiency and experiences problem on the low side.It is effectively ensured and gets page data from server in time when network is very poor and show, improve page data and obtain efficiency and experience.
High-level schematic functional block diagram with reference to the second embodiment that Fig. 7, Fig. 7 are page data acquisition device of the present invention.Described page data acquisition device also includes cache module 50.
Described acquisition module 30, when being additionally operable to the uncached described page data to be shown of the data base at current browser, or in the LocalStorage buffer memory of current browser during uncached described page data to be shown, or when current browser does not support page cache, or in the page cache of current browser during uncached described page data to be shown, obtain described page data to be shown from described server and show;
When current browser does not support buffer memory, or in the buffer memory that current browser is supported during uncached described data to be displayed, described browser sends page data to server and obtains request, obtains described page data to be shown from described server.After getting described page data to be shown from described server, described page data to be shown is shown by described browser at current page.
Described cache module 50, is used in the buffer memory supported by described page data buffer memory to be shown to current browser.
After getting described page data to be shown from described server, in the buffer memory that described data to be displayed buffer memory to current browser is supported by described browser, for instance, buffer memory is to database caches, in LocalStorage buffer memory or in page cache.Preferably, it is judged that whether described page data to be shown is the page data often accessed, if so, then by described page data buffer memory to be shown to database caches;If it is not, in the buffer memory then described page data buffer memory to be shown to current browser not supported.
The present embodiment is not when current browser supports buffer memory, or in the buffer memory that current browser is supported during uncached described data to be displayed, in the buffer memory that described data to be displayed buffer memory to the current browser obtained from server is supported, when accessing described page data to be shown for next time, directly obtain from browser this locality, reduce the acquisition flow process of page data, improve page data and obtain efficiency.
High-level schematic functional block diagram with reference to the 3rd embodiment that Fig. 8, Fig. 8 are page data acquisition device of the present invention.Described page data acquisition device also includes sending and receiving module 60.
Described acquisition module 30, is additionally operable to obtain the version number of the page data of buffer memory in described database caches;
Described sending and receiving module 60, for sending described version number to server, for whether version number described in server analysis is latest edition number;
Each page data is respectively provided with a version number, the up-to-date version number of version number and the server of the page data of browser rs cache always time, illustrate that described page data is up-to-date page data, if when the version number of page data of browser rs cache is lower than the version number of the page data of server, it is necessary to update the page data of browser rs cache.Whether the version number of the page data of browser rs cache is sent to server by described browser every Preset Time (10 minutes or 20 minutes etc.), be up-to-date version number for version number described in server analysis.Described server, when described version number is not latest edition, returns the page data of latest edition number to described browser.
Described sending and receiving module 60, is additionally operable to receive the page data of the latest edition number that server returns;
Described cache module 50, is additionally operable to the page data of described latest edition number is associated buffer memory in the database with described latest edition number.
Described browser receives the page data of the latest edition number that server returns, and after the page data receiving the latest edition number that described server returns, described latest edition page data is associated buffer memory in the database with described latest edition number, with update described browser end page data for up-to-date.
The present embodiment is by constantly sending the version number of the page data of browser local cache to server, it it is whether up-to-date version number for version number described in server analysis, when not being up-to-date, server issues the page data of latest edition number to browser, and browser updates local page data according to the page data received.The page data being effectively ensured browser local is up-to-date page data, improves the Experience Degree that page data accesses.
These are only the preferred embodiments of the present invention; not thereby the scope of the claims of the present invention is limited; every equivalent structure utilizing description of the present invention and accompanying drawing content to make or equivalence flow process conversion; or directly or indirectly it is used in other relevant technical fields, all in like manner include in the scope of patent protection of the present invention.

Claims (10)

1. a page data acquisition methods, it is characterised in that comprise the following steps:
After receiving page data request, it is determined that the page data to be shown that described page data request is corresponding, and judge whether current browser supports database caches;
When current browser supports database caches, it is judged that page data to be shown described in the data base of current browser whether buffer memory;
When page data to be shown described in the database caches of current browser, from the data base of current browser, obtain described page data to be shown and show at current page.
2. page data acquisition methods as claimed in claim 1, it is characterised in that described judge the step whether current browser supports database caches after, also include:
When current browser does not support database caches, it is judged that whether current browser supports LocalStorage buffer memory;
When current browser supports LocalStorage buffer memory, it is judged that whether page data to be shown described in buffer memory in LocalStorage buffer memory;
In LocalStorage buffer memory described in buffer memory during page data to be shown, from described LocalStorage buffer memory, obtain described page data to be shown and show at current page.
3. page data acquisition methods as claimed in claim 2, it is characterised in that described judge the step whether current browser supports LocalStorage buffer memory after, also include:
When current browser does not support LocalStorage buffer memory, it is judged that whether current browser supports page cache;
When current browser supports page cache, it is judged that whether page data to be shown described in buffer memory in page cache;
In page cache described in buffer memory during page data to be shown, from described page cache, obtain described page data to be shown and show at current page.
4. page data acquisition methods as claimed in claim 3, it is characterised in that described page data acquisition methods also includes:
During the uncached described page data to be shown of data base at current browser, or in the LocalStorage buffer memory of current browser during uncached described page data to be shown, or when current browser does not support page cache, or in the page cache of current browser during uncached described page data to be shown, obtain described page data to be shown from described server and show;
By in described page data buffer memory to be shown to database caches.
5. page data acquisition methods as claimed in claim 4, it is characterised in that described after step in described page data buffer memory to be shown to database caches, also will include:
Obtain the version number of the page data of buffer memory in described database caches, and described version number is sent to server, for whether version number described in server analysis is latest edition number;
Receive the page data of the latest edition number that server returns, and the page data of described latest edition number is associated buffer memory in the database with described latest edition number.
6. a page data acquisition device, it is characterised in that including:
Determine module, for after receiving page data request, it is determined that the page data to be shown that described page data request is corresponding;
Judge module, is used for judging whether current browser supports database caches;It is additionally operable to when current browser supports database caches, it is judged that page data to be shown described in the data base of current browser whether buffer memory;
Acquisition module, for when page data to be shown described in the database caches of current browser, obtaining described page data to be shown from the data base of current browser;
Display module, for showing described page data to be shown at current page.
7. page data acquisition device as claimed in claim 6, it is characterised in that described judge module, is additionally operable to when current browser does not support database caches, it is judged that whether current browser supports LocalStorage buffer memory;It is additionally operable to when current browser supports LocalStorage buffer memory, it is judged that whether page data to be shown described in buffer memory in LocalStorage buffer memory;
Described acquisition module, is additionally operable in LocalStorage buffer memory described in buffer memory during page data to be shown, obtains described page data to be shown from described LocalStorage buffer memory.
8. page data acquisition device as claimed in claim 7, it is characterised in that described judge module, is additionally operable to when current browser does not support LocalStorage buffer memory, it is judged that whether current browser supports page cache;It is additionally operable to when current browser supports page cache, it is judged that whether page data to be shown described in buffer memory in page cache;
Described acquisition module, is additionally operable in page cache described in buffer memory during page data to be shown, obtains described page data to be shown from described page cache.
9. page data acquisition device as claimed in claim 8, it is characterised in that described page data acquisition device also includes cache module,
Described acquisition module, when being additionally operable to the uncached described page data to be shown of the data base at current browser, or in the LocalStorage buffer memory of current browser during uncached described page data to be shown, or when current browser does not support page cache, or in the page cache of current browser during uncached described page data to be shown, obtain described page data to be shown from described server and show;
Cache module, for by described page data buffer memory to be shown to database caches.
10. page data acquisition device as claimed in claim 9, it is characterised in that described page data acquisition device also includes sending and receiving module,
Described acquisition module, is additionally operable to obtain the version number of the page data of buffer memory in described database caches;
Sending and receiving module, for sending described version number to server, for whether version number described in server analysis is latest edition number;It is additionally operable to receive the page data of the latest edition number that server returns;
Described cache module, is additionally operable to the page data of described latest edition number is associated buffer memory in the database with described latest edition number.
CN201410810771.7A 2014-12-22 2014-12-22 Page data acquiring method and device Pending CN105786844A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410810771.7A CN105786844A (en) 2014-12-22 2014-12-22 Page data acquiring method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410810771.7A CN105786844A (en) 2014-12-22 2014-12-22 Page data acquiring method and device

Publications (1)

Publication Number Publication Date
CN105786844A true CN105786844A (en) 2016-07-20

Family

ID=56377861

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410810771.7A Pending CN105786844A (en) 2014-12-22 2014-12-22 Page data acquiring method and device

Country Status (1)

Country Link
CN (1) CN105786844A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109543127A (en) * 2018-11-26 2019-03-29 杭州安恒信息技术股份有限公司 A kind of page furbishing method, device, equipment and readable storage medium storing program for executing
CN110069505A (en) * 2017-09-21 2019-07-30 张锐 Off-line data processing method and off-line data updating device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100057847A1 (en) * 2008-09-04 2010-03-04 Alibaba Group Holding Limited Method, Device, and system for acquiring a web page
CN102480397A (en) * 2010-11-26 2012-05-30 金蝶软件(中国)有限公司 Method and equipment for accessing internet pages
CN103023941A (en) * 2011-09-26 2013-04-03 腾讯科技(深圳)有限公司 Terminal application program updating method and system based on Web page
CN103455478A (en) * 2012-05-21 2013-12-18 腾讯科技(深圳)有限公司 Webpage access accelerating method and device
CN103514179A (en) * 2012-06-21 2014-01-15 腾讯科技(深圳)有限公司 Method for web browser to switch over historical webpages and web browser
CN104077310A (en) * 2013-03-28 2014-10-01 联想(北京)有限公司 Method, equipment and system for loading resource file

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100057847A1 (en) * 2008-09-04 2010-03-04 Alibaba Group Holding Limited Method, Device, and system for acquiring a web page
CN102480397A (en) * 2010-11-26 2012-05-30 金蝶软件(中国)有限公司 Method and equipment for accessing internet pages
CN103023941A (en) * 2011-09-26 2013-04-03 腾讯科技(深圳)有限公司 Terminal application program updating method and system based on Web page
CN103455478A (en) * 2012-05-21 2013-12-18 腾讯科技(深圳)有限公司 Webpage access accelerating method and device
CN103514179A (en) * 2012-06-21 2014-01-15 腾讯科技(深圳)有限公司 Method for web browser to switch over historical webpages and web browser
CN104077310A (en) * 2013-03-28 2014-10-01 联想(北京)有限公司 Method, equipment and system for loading resource file

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
谢杰涛 等: "Web系统高性能本地数据缓存实现机制", 《计算机应用研究》 *
高飞 等: "Web页面缓存技术在业务系统中的应用", 《计算机技术与发展》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110069505A (en) * 2017-09-21 2019-07-30 张锐 Off-line data processing method and off-line data updating device
CN110069505B (en) * 2017-09-21 2021-12-24 张锐 Offline data processing method and offline data updating device
CN109543127A (en) * 2018-11-26 2019-03-29 杭州安恒信息技术股份有限公司 A kind of page furbishing method, device, equipment and readable storage medium storing program for executing
CN109543127B (en) * 2018-11-26 2020-12-11 杭州安恒信息技术股份有限公司 Page refreshing method, device and equipment and readable storage medium

Similar Documents

Publication Publication Date Title
US9916390B2 (en) Managing web browser cache for offline browsing
US20080195588A1 (en) Personalized Search Method and System for Enabling the Method
US9195638B2 (en) Method and apparatus of processing nested fragment caching of a web page
EP2151981A1 (en) Method, system and apparatus for implanting advertisement
JP6328233B2 (en) Computer program product, system and method for optimizing web page loading
EP3226159A1 (en) System and method for managing browsing histories of web browser
US20140046938A1 (en) History records sorting method and apparatus
CN105320687A (en) Webpage display method and device
US20070294222A1 (en) On-demand news service based on end-user requested and generated content
US20100169756A1 (en) Automated bookmarking
CN101335762A (en) Method, server, terminal and system reflecting historical using behavior of webpage
US20160292291A1 (en) Methods and apparatuses for opening a webpage, invoking a client, and creating a light application
CN105069011A (en) Webpage favorite management method, device and system
CN101957842A (en) Webpage cache control method, device and system based on WebKit browser
CN107291940A (en) Content of pages management method, device and associated server
US11720407B2 (en) Resource pre-fetch using age threshold
CN105786844A (en) Page data acquiring method and device
JP2006139470A (en) Information provision device, information provision method and program therefor
US9306884B2 (en) Computer-based method and system for processing a file request in response to a message received from a user mobile device
CN105956202A (en) Web page display method and web page display apparatus in browser as well as terminal
CN116070052A (en) Interface data transmission method, device, terminal and storage medium
KR101734533B1 (en) Method for providing news of multi-nations
KR101140262B1 (en) System, method and computer readable recording medium for providing search result
US9172739B2 (en) Anticipating domains used to load a web page
KR20100079052A (en) Method, system and computer-readable recording medium for providing web page using cache

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20160720