CN104516973A - Method and device for accessing page - Google Patents
Method and device for accessing page Download PDFInfo
- Publication number
- CN104516973A CN104516973A CN201410832070.3A CN201410832070A CN104516973A CN 104516973 A CN104516973 A CN 104516973A CN 201410832070 A CN201410832070 A CN 201410832070A CN 104516973 A CN104516973 A CN 104516973A
- Authority
- CN
- China
- Prior art keywords
- page
- identifier
- appended document
- request
- data information
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
- G06F16/9574—Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention provides a method and a device for accessing a page. The method includes the steps: transmitting a page access request to a web server by a user device; receiving page data information returned by the web server, and judging whether the page data information comprises an additive file of the page or not; acquiring an additive file of a local pre-stored page when the page data information only comprises a main structure file of the page; determining whole page information according to the main structure file and the pre-stored additive file of the page, and displaying the page. By the aid of the method and the device, network request frequency and data transmission quantity are decreased, page access is accelerated, further, a user can shorten waiting time for refreshing the page, and the browsing experience of the user is improved.
Description
Technical field
The present invention relates to Internet technical field, specifically, the present invention relates to a kind of method and apparatus of accession page.
Background technology
The development of internet subsequently, for user provides more and more abundanter Internet resources, user can know web page contents by browsing webpage.Existing webpage comprises bulk information mostly, enriches polynary form design and interactive function easily to realize webpage.But, the webpage comprising bulk information can comprise more pagefile, when each request access webpage, need set up respectively for multiple pagefile and send multiple HTTP request, accordingly, need to receive respectively and load multiple pagefiles that web server returns in response to multiple HTTP request; Multiple network request can take more Internet resources, reduces the web server response time, thus reduces webpage access speed, extends the stand-by period that user browses webpage, reduces Consumer's Experience.
In order to solve the problem, in existing page access technology, during user equipment access webpage, while load page file, pagefile can be stored into local as page cache.When user accesses this webpage again, for the static content of this page, browser preferentially directly obtains data from local cache, thus can improve the speed of accessed web page.For guaranteeing to upgrade in time, timestamp can be inserted in web data, and the preset update cycle, when subscriber equipment judges that the storage time of this static content exceedes the update cycle, from web server again request msg.Subscriber equipment preferentially directly obtains data from local cache, this generates in the server respective page Data Update time, the subscriber equipment end caused because storage time does not exceed the update cycle does not upgrade in time the problem of these respective page data of local cache.
Summary of the invention
Object of the present invention is intended at least solve one of above-mentioned technological deficiency, proposes the present invention to provide a kind of a kind of method of accession page in a user device overcoming the problems referred to above or solve the problem at least in part, comprising:
Send accessing page request to web server, wherein, accessing page request comprises the first page identifier of the page;
Receive the page data information that web server returns, judge whether page data information comprises the appended document of the page;
When judging that page data information only comprises the agent structure file of the page, obtain the appended document of the local page prestored; And
According to the agent structure file of the page and the appended document of the local page prestored, determine complete page surface information and display page.
Present invention also offers a kind of method of the supplementary access page in web server, comprising:
Receive the accessing page request that subscriber equipment sends, wherein, accessing page request comprises the first page identifier of the page;
Determine the second page identifier of the corresponding page of accessing page request, the second page identifier and first page identifier are contrasted; And
When the second page identifier is identical with first page identifier, return the page data information of the agent structure file comprising the page to subscriber equipment.
Present invention also offers a kind of device of accession page in a user device, comprising:
Request sending module, for sending accessing page request to web server, wherein, accessing page request comprises the first page identifier of the page;
First judge module, for receiving the page data information that web server returns, judges whether page data information comprises the appended document of the page;
Prestore file acquisition module, for when judging that page data information only comprises the agent structure file of the page, obtains the appended document of the local page prestored; And
First display module, for according to the agent structure file of the page and the appended document of the page that prestores, determines complete page surface information and display page.
Present invention also offers a kind of device of the supplementary access page in web server, comprising:
Request receiving module, for receiving the accessing page request that subscriber equipment sends, wherein, accessing page request comprises the first page identifier of the page;
Second mark determination module, for determining the second page identifier of the corresponding page of accessing page request, contrasts the second page identifier and first page identifier; And
First returns module, for when the second page identifier is identical with first page identifier, returns the page data information of the agent structure file comprising the page to subscriber equipment.
In the embodiment of this programme, when the second page identifier of the web server determination page is identical with first page identifier, namely show that the appended document of the page does not upgrade, then in response to accessing page request to subscriber equipment only back page subject matter, subscriber equipment reads the local appended document prestored, and shows the page in conjunction with the page subject matter received; Appended document due to the page is generally CSS file and JavaScript script file, quantity of documents is more, by subscriber equipment end prestoring to the appended document of the page and first page identifier, and server end is to the comparison of first page identifier and the second page identifier, achieve the appended document of server-side page do not occur more new change time, without the need to returning the displaying that multiple appended document can realize the page to subscriber equipment; Thus when each request access page, only need to set up and send a HTTP request, and only need to receive and load one section of page data information that web server returns in response to this HTTP request, reduce network request number of times, simultaneously, because this page data information only comprises page subject matter, its data volume is less; To sum up, the present invention, by reducing network request number of times and reducing volume of transmitted data, greatly reduces the occupancy of Internet resources, reduce the web server response time, improve page access speed, further, the stand-by period of user's refresh page can be shortened, improve user's viewing experience.
The aspect that the present invention adds and advantage will part provide in the following description, and these will become obvious from the following description, or be recognized by practice of the present invention.
Accompanying drawing explanation
The present invention above-mentioned and/or additional aspect and advantage will become obvious and easy understand from the following description of the accompanying drawings of embodiments, wherein:
Fig. 1 is the schematic flow sheet of a method embodiment of accession page in the present invention;
Fig. 2 is the schematic flow sheet of a method preferred embodiment of accession page in the present invention;
Fig. 3 is the structural representation of a device embodiment of accession page in the present invention;
Fig. 4 is the structural representation of a device preferred embodiment of accession page in the present invention.
Embodiment
Be described below in detail embodiments of the invention, the example of described embodiment is shown in the drawings, and wherein same or similar label represents same or similar element or has element that is identical or similar functions from start to finish.Being exemplary below by the embodiment be described with reference to the drawings, only for explaining the present invention, and can not limitation of the present invention being interpreted as.
Those skilled in the art of the present technique are appreciated that unless expressly stated, and singulative used herein " ", " one ", " described " and " being somebody's turn to do " also can comprise plural form.Should be further understood that, the wording used in instructions of the present invention " comprises " and refers to there is described feature, integer, step, operation, element and/or assembly, but does not get rid of and exist or add other features one or more, integer, step, operation, element, assembly and/or their group.Should be appreciated that, when we claim element to be " connected " or " coupling " to another element time, it can be directly connected or coupled to other elements, or also can there is intermediary element.In addition, " connection " used herein or " coupling " can comprise wireless connections or wirelessly to couple.Wording "and/or" used herein comprises one or more whole or arbitrary unit listing item be associated and all combinations.
Those skilled in the art of the present technique are appreciated that unless otherwise defined, and all terms used herein (comprising technical term and scientific terminology), have the meaning identical with the general understanding of the those of ordinary skill in field belonging to the present invention.It should also be understood that, those terms defined in such as general dictionary, should be understood to that there is the meaning consistent with the meaning in the context of prior art, unless and by specific definitions as here, otherwise can not explain by idealized or too formal implication.
Fig. 1 is the process flow diagram of a method embodiment of accession page in the present invention.
Method according to the present invention comprises the step S1110, step S1120, step S1130 and the step S1140 that are performed by subscriber equipment, and the step S1210, step S1220 and the step S1230 that are performed by web server.
In step S1110, subscriber equipment sends accessing page request to web server, and wherein, accessing page request comprises the first page identifier of the page; In step S1210, web server receives the accessing page request that subscriber equipment sends; In step S1220, determine the second page identifier of the corresponding page of accessing page request, the second page identifier and first page identifier are contrasted; In step S1230, when the second page identifier is identical with first page identifier, return the page data information of the agent structure file comprising the page to subscriber equipment; In step S1120, receive the page data information that web server returns, judge whether page data information comprises the appended document of the page; In step S1130, when judging that page data information only comprises the agent structure file of the page, obtain the appended document of the local page prestored; In step S1140, according to agent structure file and the appended document of the page prestored of the page, determine complete page surface information and display page.
In the present embodiment, when the second page identifier of the web server determination page is identical with first page identifier, namely show that the appended document of the page does not upgrade, then in response to accessing page request to subscriber equipment only back page subject matter, subscriber equipment reads the local appended document prestored, and shows the page in conjunction with the page subject matter received; Appended document due to the page is generally CSS file and JavaScript script file, quantity of documents is more, by subscriber equipment end prestoring to the appended document of the page and first page identifier, and server end is to the comparison of first page identifier and the second page identifier, achieve the appended document of server-side page do not occur more new change time, without the need to returning the displaying that multiple appended document can realize the page to subscriber equipment; Thus when each request access page, only need to set up and send a HTTP request, and only need to receive and load one section of page data information that web server returns in response to this HTTP request, reduce network request number of times, simultaneously, because this page data information only comprises page subject matter, its data volume is less; To sum up, the present invention, by reducing network request number of times and reducing volume of transmitted data, greatly reduces the occupancy of Internet resources, reduce the web server response time, improve page access speed, further, the stand-by period of user's refresh page can be shortened, improve user's viewing experience.
In the present embodiment, the agent structure file of the page comprises html file, and appended document and the renewal appended document of the page prestored comprise CSS file and JavaScript script file.
In the present embodiment, first page identifier is the page identifier corresponding to the appended document of the page that this locality prestores; Second page identifier is store the page identifier corresponding to the appended document of the page in web server.
Particularly, in step S1110, subscriber equipment sends accessing page request to web server, and wherein, accessing page request comprises the first page identifier of the page.
After subscriber equipment sends the accessing page request of the page first to web server, what can receive that web server returns comprises the page data information of page subject matter and appended document and the second page identifier of the page, after subscriber equipment receives this page data information and this second page identifier, second page identifier is stored in this locality as first page identifier, such as, can be stored in browser cookie.Wherein, the second page identifier is web server when upgrading the page each time, to the renewal appended document in page data information, as CSS file and JavaScript script file, carries out MD5 and calculates and determine to obtain.Meanwhile, by the appended document in this page data information, be stored in local storage region as the appended document prestored.The mode of appended document of prestoring can be: by the conversion regime of JS, attachment files is converted to string data, and utilizes the localstorage characteristic of HTML, this string data be stored in local storage region.
Carry out MD5 due to different pieces of information to calculate the result of calculation determined there is uniqueness, therefore, as long as more new events occurs for the CSS file of the page and JavaScript script file, then MD5 is carried out to the file after upgrading and calculate the second page identifier determined and also can correspondingly change.
In one example, according to URL or the address information of the page, inquire about in browser cookie, determine the first page identifier of this page, subsequently, according to URL and the first page identifier of the page, generate accessing page request, and the accessing page request of the first page identifier comprising the page is sent to web server.
Preferably, the first page identifier that whether there is requested page in local storage is judged according to accessing page request, if exist, then obtain this first page identifier, if do not exist, then as the situation of accessing this page first, accessing page request is submitted to web server, and receive the second page identifier of the requested page that web server returns, this second page identifier is stored in local storage as first page identifier.
In step S1210, web server receives the accessing page request that subscriber equipment sends, and wherein, accessing page request comprises the first page identifier of the page.
In step S1220, determine the second page identifier of the corresponding page of accessing page request, the second page identifier and first page identifier are contrasted.
Particularly, read the accessing page request received, resolve this accessing page request to determine URL and the first page identifier of requested page, according to URL or the network identity ID of this page, inquire about in the storage area of web server, determine to compare the second page identifier and first page identifier by the second page identifier that requested page is corresponding, determine that whether the second page identifier is identical with first page identifier.
In step S1230, when the second page identifier is identical with first page identifier, return the page data information of the agent structure file comprising the page to subscriber equipment.
Particularly, when judgement second page identifier is identical with first page identifier, there is not more new events in the attachment files of the surperficial page, then obtain the agent structure file of requested page, as the html file of the page, and this html file is back to subscriber equipment as page data information.
In step S1120, the network equipment receives the page data information that web server returns, and judges whether page data information comprises the appended document of the page.
Particularly, the network equipment receives the page data information that web server returns, and reads this page number information, judges the CSS file and the JavaScript script file that wherein whether comprise requested page.
In step S1130, when judging that page data information only comprises the agent structure file of the page, obtain the appended document of the local page prestored.
Such as, when not comprising CSS file and the JavaScript script file of the page when judging page data information only to comprise page HTML file, according to URL or the page iden-tity ID of this page, in this locality stores, obtain CSS file and the JavaScript script file of this page prestored.
Wherein, step S1130 (with reference to Fig. 1) specifically comprises step S1131 (not shown) and step S1132 (not shown); In step S1131, read the string data that prestores of the local page stored; In step S1132, to prestoring, string data carries out conversion process, to determine the attachment files that prestores of the page.
Particularly, when the network equipment gets the appended document from the page of web server, by the conversion regime of JS, attachment files is converted to string data, and utilize the localstorage characteristic of HTML, this string data is stored in local storage region.When need obtain the page prestore appended document time, in local storage region, read the string data that prestores of this page; Then, by the conversion regime of JS, to prestoring, string data carries out conversion process, and the attachment files that prestores of this page is determined in conversion.
In step S1140, according to agent structure file and the appended document that prestores of the page, determine complete page surface information and display page.
In one example, according to the html file of the page, CSS file and JavaScript script file determination complete page surface information, read, resolve this complete page data message, and this page rendering is presented on screen.
Fig. 2 is the process flow diagram of a method preferred embodiment of accession page in the present invention.
As shown in Figure 2, in step S2110, subscriber equipment sends accessing page request to web server, and wherein, accessing page request comprises the first page identifier of the page; In step S2210, web server receives the accessing page request that subscriber equipment sends; In step S2220, determine the second page identifier of the corresponding page of accessing page request, the second page identifier and first page identifier are contrasted; In step S2240, when the second page identifier and first page identifier are not identical, return the agent structure file and the renewal page data information of appended document and the second page identifier of the page that comprise the page to subscriber equipment; In step S2150, judge whether the page data information that web server returns comprises the agent structure file of the page and upgrade appended document; In step S2160, when the page data information that web server returns comprises the agent structure file of the page and upgrades appended document, the agent structure file of the page that load page data message comprises and renewal appended document, display page; In step S2170, according to renewal appended document, upgrade the appended document of the local page prestored.
In this preferred embodiment, when web server judges to determine that the second page identifier of the page and first page identifier are not identical, namely show that more new events occurs the appended document of the page, then in response to accessing page request to subscriber equipment back page subject matter and upgrade appended document, subscriber equipment according to the page subject matter received and renewal appended document the page is shown; Ensure that the appended document of the page occur more new events time, subscriber equipment access this page time can get up-to-date page data, avoid renewal of the page postpone situation.
Wherein, the executable operations of subscriber equipment in step S2110 and the executable operations of web server in step S2210 and step 2220, identical with the executable operations of subscriber equipment in Fig. 1 in step S1110 and the executable operations of web server in step S1210 with step 1220, do not repeat them here.
Particularly, in step S2240, when judgement second page identifier is identical with first page identifier, then obtain the agent structure file of requested page, as html file, with the renewal appended document of the page, as CSS file and JavaScript script file, and using this html file and CSS file and JavaScript script file as page data information; Meanwhile, inquire about in the storage area of web server according to the URL of this page or network identity ID, determine the second page identifier that this page is corresponding; Subsequently, this page data information and the merging of this second page iden-tity are back to subscriber equipment.
Preferably (with reference to Fig. 2), the method also comprises step S2250 (not shown), in step S2250, according to the renewal appended document of the page, calculates by MD5 the second page identifier upgrading the page.
Particularly, when detect the appended document of the page occur more new events time, obtain the renewal appended document of this page; Subsequently, according to the renewal appended document of this page, calculate by MD5 the second page identifier upgrading the page.
In one example, when performing renewal rewards theory to the appended document of the page, as performed renewal rewards theory to the CSS file of the page and JavaScript script file, then obtain the CSS file after upgrading and JavaScript script file, extract the code of CSS file and JavaScript script file and code is merged, being combined code subsequently and doing MD5 calculating; Then, according to MD5 result of calculation, to upgrade second page identifier of this page in the storage area of web server.
In this preferred embodiment, when the appended document of the page occur more new events time, the second page identifier of the page can be upgraded in real time, provide up-to-date page data to give security for follow-up to the network equipment.
Subscriber equipment receives the page data information that web server returns, and judges whether page data information comprises the appended document of the page; In step S2150, judge whether the page data information that web server returns comprises the agent structure file of the page and upgrade appended document; In step S2160, when the page data information that web server returns comprises the agent structure file of the page and upgrades appended document, the agent structure file of the page that load page data message comprises and renewal appended document, display page.
Such as, when judging that page data information that web server returns comprises the html file of the page, CSS file and JavaScript script file, reading, resolving this page data information, and this page rendering is presented on screen.
In step S2170, according to renewal appended document, upgrade the appended document of the local page prestored.
Particularly, the data record of the appended document of the page prestored this locality is deleted, and the data of the renewal appended document received is recorded in corresponding local storage region.
In this preferred embodiment, when the appended document of the page occur more new events time, the attachment files that this locality prestores according to the renewal appended document received by the network equipment upgrades, make follow-up again request browse this page and attachment files for being updated time, directly can read and load the local attachment files stored, and repeat to return attachment files without the need to web server, reduce the occupancy of Internet resources, reduce the web server response time.
Preferably (with reference to Fig. 2), the method also comprises step S2180 (not shown), in step S2180, according to the second page identifier of the page that web server returns, upgrades the first page identifier of the local page stored.
Particularly, the data record of the first page identifier of the page stored this locality is deleted, and is recorded in corresponding local storage region by the data of the second page identifier of the page received, as the first page identifier of this page.Such as, the data record of the first page identifier of the page stored in cookie is deleted, and again will receive the second page identifier and write in cookie, and as the first page identifier of this page.
In this preferred embodiment, when the appended document of the page occur more new events time, the first page identifier that this locality stores according to the second page identifier of the page received by the network equipment upgrades, for follow-up again request browse this page time, judge whether the attachment files of the page more new change occurs and provides guarantee.
In a preferred embodiment (with reference to Fig. 1), the method also comprises step S1180 (not shown) and step S1190 (not shown); In step S1180, when judging that page data information only comprises the agent structure file of the page, and obtain the appended document failure of the local page prestored, the network equipment sends the accessing page request of the page again to web server; In step S1180, receive the agent structure file comprising the page that web server returns and the page data information upgrading appended document.
In this preferred embodiment, the appended document of the page prestored when this locality be damaged or non-full storage time, again can obtain appended document to web server, guarantee that webpage can be represented by complete.
Fig. 3 is the structural representation of a device embodiment of accession page in the present invention.
Request sending module 3110 in subscriber equipment sends accessing page request to web server, and wherein, accessing page request comprises the first page identifier of the page; The request receiving module 3210 of web server receives the accessing page request of subscriber equipment transmission; Second mark determination module 3220 determines the second page identifier of the corresponding page of accessing page request, the second page identifier and first page identifier is contrasted; When the second page identifier is identical with first page identifier, first returns module 3230 returns page data information from the agent structure file comprising the page to subscriber equipment; The first judge module 3120 in subscriber equipment receives the page data information that web server returns, and judges whether page data information comprises the appended document of the page; When judging that page data information only comprises the agent structure file of the page, the file acquisition module 3130 that prestores obtains the appended document of the page that this locality prestores; First display module 3140, according to the appended document of the agent structure file of the page with the page prestored, determines complete page surface information and display page.
In the present embodiment, when the second page identifier of the web server determination page is identical with first page identifier, namely show that the appended document of the page does not upgrade, then in response to accessing page request to subscriber equipment only back page subject matter, subscriber equipment reads the local appended document prestored, and shows the page in conjunction with the page subject matter received; Appended document due to the page is generally CSS file and JavaScript script file, quantity of documents is more, by subscriber equipment end prestoring to the appended document of the page and first page identifier, and server end is to the comparison of first page identifier and the second page identifier, achieve the appended document of server-side page do not occur more new change time, without the need to returning the displaying that multiple appended document can realize the page to subscriber equipment; Thus when each request access page, only need to set up and send a HTTP request, and only need to receive and load one section of page data information that web server returns in response to this HTTP request, reduce network request number of times, simultaneously, because this page data information only comprises page subject matter, its data volume is less; To sum up, the present invention, by reducing network request number of times and reducing volume of transmitted data, greatly reduces the occupancy of Internet resources, reduce the web server response time, improve page access speed, further, the stand-by period of user's refresh page can be shortened, improve user's viewing experience.
In the present embodiment, the agent structure file of the page comprises html file, and the appended document that prestores of the page comprises CSS file and JavaScript script file with renewal appended document.
Particularly, request sending module 3110 sends accessing page request to web server, and wherein, accessing page request comprises the first page identifier of the page.
After subscriber equipment sends the accessing page request of the page first to web server, what can receive that web server returns comprises the page data information of page subject matter and appended document and the second page identifier of the page, after subscriber equipment receives this page data information and this second page identifier, second page identifier is stored in this locality as first page identifier, such as, can be stored in browser cookie.Wherein, the second page identifier is web server when upgrading the page each time, to the renewal appended document in page data information, as CSS file and JavaScript script file, carries out MD5 and calculates and determine to obtain.Meanwhile, by the appended document in this page data information, be stored in local storage region as the appended document prestored.The mode of appended document of prestoring can be: by the conversion regime of JS, attachment files is converted to string data, and utilizes the localstorage characteristic of HTML, this string data be stored in local storage region.
Carry out MD5 due to different pieces of information to calculate the result of calculation determined there is uniqueness, therefore, as long as more new events occurs for the CSS file of the page and JavaScript script file, then MD5 is carried out to the file after upgrading and calculate the second page identifier determined and also can correspondingly change.
In one example, according to URL or the address information of the page, inquire about in browser cookie, determine the first page identifier of this page, subsequently, according to URL and the first page identifier of the page, generate accessing page request, and the accessing page request of the first page identifier comprising the page is sent to web server.
Preferably, the first page identifier that whether there is requested page in local storage is judged according to accessing page request, if exist, then obtain this first page identifier, if do not exist, then as the situation of accessing this page first, accessing page request is submitted to web server, and receive the second page identifier of the requested page that web server returns, this second page identifier is stored in local storage as first page identifier.
The request receiving module 3210 of web server receives the accessing page request of subscriber equipment transmission, and wherein, accessing page request comprises the first page identifier of the page.
Subsequently, the second mark determination module 3220 determines the second page identifier of the corresponding page of accessing page request, the second page identifier and first page identifier is contrasted.
Particularly, read the accessing page request received, resolve this accessing page request to determine URL and the first page identifier of requested page, according to URL or the network identity ID of this page, inquire about in the storage area of web server, determine to compare the second page identifier and first page identifier by the second page identifier that requested page is corresponding, determine that whether the second page identifier is identical with first page identifier.
When the second page identifier is identical with first page identifier, first of subscriber equipment returns module 3230 returns page data information from the agent structure file comprising the page to subscriber equipment.
Particularly, when judgement second page identifier is identical with first page identifier, there is not more new events in the attachment files of the surperficial page, then obtain the agent structure file of requested page, as the html file of the page, and this html file is back to subscriber equipment as page data information.
The first judge module 3120 in subscriber equipment receives the page data information that web server returns, and judges whether page data information comprises the appended document of the page.
Particularly, the network equipment receives the page data information that web server returns, and reads this page number information, judges the CSS file and the JavaScript script file that wherein whether comprise requested page.
When judging that page data information only comprises the agent structure file of the page, the file acquisition module 3130 that prestores obtains the appended document of the page that this locality prestores.
Such as, when not comprising CSS file and the JavaScript script file of the page when judging page data information only to comprise page HTML file, according to URL or the page iden-tity ID of this page, in this locality stores, obtain CSS file and the JavaScript script file of this page prestored.
Wherein, the file acquisition module that prestores 3130 (with reference to Fig. 3) specifically comprises character string reading unit (not shown) and the document determining unit (not shown) that prestores; Character string reading unit reads the string data that prestores of the local page stored; Then, the document determining unit that prestores carries out conversion process to the string data that prestores, to determine the attachment files of the page that this locality prestores.
Particularly, when the network equipment gets the appended document from the page of web server, by the conversion regime of JS, attachment files is converted to string data, and utilize the localstorage characteristic of HTML, this string data is stored in local storage region.When need obtain the page prestore appended document time, in local storage region, read the string data that prestores of this page; Then, by the conversion regime of JS, to prestoring, string data carries out conversion process, and the attachment files of this page that this locality prestores is determined in conversion.
The appended document of this page that the first display module 3140 prestores according to the agent structure file of the page and this locality, determines complete page surface information and display page.
In one example, according to the html file of the page, CSS file and JavaScript script file determination complete page surface information, read, resolve this complete page data message, and this page rendering is presented on screen.
Fig. 4 is the structural representation of a device preferred embodiment of accession page in the present invention.
As shown in Figure 4, the request sending module 4110 of subscriber equipment sends accessing page request to web server, and wherein, accessing page request comprises the first page identifier of the page; The request receiving module 4210 of web server receives the accessing page request of subscriber equipment transmission; Then, the second mark determination module 4220 determines the second page identifier of the corresponding page of accessing page request, the second page identifier and first page identifier is contrasted; Subsequently, second returns module 4240 when the second page identifier and first page identifier are not identical, returns the agent structure file and the renewal page data information of appended document and the second page identifier of the page that comprise the page to subscriber equipment; Second judge module 4150 of the network equipment judges whether the page data information that web server returns comprises the agent structure file of the page and upgrade appended document; When the page data information judging that web server returns comprises the agent structure file of the page and upgrades appended document, the agent structure file of the page that the second display module 4160 load page data message comprises and renewal appended document, display page; The update module that prestores 4170, according to renewal appended document, upgrades the appended document that prestores of the local page stored.
In this preferred embodiment, when web server judges to determine that the second page identifier of the page and first page identifier are not identical, namely show that more new events occurs the appended document of the page, then in response to accessing page request to subscriber equipment back page subject matter and upgrade appended document, subscriber equipment according to the page subject matter received and renewal appended document the page is shown; Ensure that the appended document of the page occur more new events time, subscriber equipment access this page time can get up-to-date page data, avoid renewal of the page postpone situation.
Wherein, the executable operations of the executable operations of the request sending module 4110 of subscriber equipment and the request receiving module 4210 of web server and the second mark determination module 4220, identical with the executable operations that the executable operations of the request sending module 3110 of subscriber equipment in Fig. 3 and the request receiving module 3210 of web server and second identify determination module 3220, do not repeat them here.
Particularly, when judgement second page identifier is identical with first page identifier, then second return the agent structure file that module 4240 obtains requested page, as html file, with the renewal appended document of the page, as CSS file and JavaScript script file, and using this html file and CSS file and JavaScript script file as page data information; Meanwhile, inquire about in the storage area of web server according to the URL of this page or network identity ID, determine the second page identifier that this page is corresponding; Subsequently, this page data information and the merging of this second page iden-tity are back to subscriber equipment.
Preferably (with reference to Fig. 4), the method also comprises the second mark computing module (not shown), and the second mark computing module, according to the renewal appended document of the page, calculates by MD5 the second page identifier upgrading the page.
Particularly, the second mark computing module comprises updating file determining unit and the second identification renewal unit; The renewal page detected, the renewal appended document of the updating file determining unit determination page; Second identification renewal unit, according to the renewal appended document of the page, calculates by MD5 the second page identifier upgrading the page.
In one example, when performing renewal rewards theory to the appended document of the page, as performed renewal rewards theory to the CSS file of the page and JavaScript script file, then obtain the CSS file after upgrading and JavaScript script file, extract the code of CSS file and JavaScript script file and code is merged, being combined code subsequently and doing MD5 calculating; Then, according to MD5 result of calculation, second page identifier of this page in the storage area of web server is upgraded.
In this preferred embodiment, when the appended document of the page occur more new events time, the second page identifier of the page can be upgraded in real time, provide up-to-date page data to give security for follow-up to the network equipment.
Subscriber equipment receives the page data information that web server returns, and the second judge module 4150 judges whether page data information comprises the agent structure file of the page and upgrade appended document; ; When the page data information judging that web server returns comprises the agent structure file of the page and upgrades appended document, the agent structure file of the page that the second display module 4160 load page data message comprises and renewal appended document, display page.
Such as, when judging that page data information that web server returns comprises the html file of the page, CSS file and JavaScript script file, reading, resolving this page data information, and this page rendering is presented on screen.
The update module that prestores 4170, according to renewal appended document, upgrades the appended document of the local page prestored.
Particularly, the data record of the appended document of the page prestored this locality is deleted, and the data of the renewal appended document received is recorded in corresponding local storage region.
In this preferred embodiment, when the appended document of the page occur more new events time, the attachment files that this locality prestores according to the renewal appended document received by the network equipment upgrades, make follow-up again request browse this page and attachment files for being updated time, directly can read and load the local attachment files prestored, and repeat to return attachment files without the need to web server, reduce the occupancy of Internet resources, reduce the web server response time.
Preferably (with reference to Fig. 4), subscriber equipment also comprises the first identification renewal module (not shown), second page identifier of the page that the first identification renewal module returns according to web server, upgrades the first page identifier of the local page stored.
Particularly, the data record of the first page identifier of the page stored this locality is deleted, and is recorded in corresponding local storage region by the data of the second page identifier of the page received, as the first page identifier of this page.Such as, the data record of the first page identifier of the page stored in cookie is deleted, and again will receive the second page identifier and write in cookie, and as the first page identifier of this page.
In this preferred embodiment, when the appended document of the page occur more new events time, the first page identifier that this locality stores according to the second page identifier of the page received by the network equipment upgrades, for follow-up again request browse this page time, judge whether the attachment files of the page more new change occurs and provides guarantee.
In a preferred embodiment (with reference to Fig. 3), the network equipment also comprises again request sending module (not shown) and page data receiver module (not shown); When judging that page data information only comprises the agent structure file of the page, and obtain the appended document failure of the local page prestored, request sending module sends the accessing page request of the page again to web server again; Page data receiver module receives the agent structure file comprising the page that web server returns and the page data information upgrading appended document.
In this preferred embodiment, the appended document of the page prestored when this locality be damaged or non-full storage time, again can obtain appended document to web server, guarantee that webpage can be represented by complete.
Those skilled in the art of the present technique are appreciated that the one or more equipment that the present invention includes and relate to for performing in operation described in the application.These equipment for required object and specialized designs and manufacture, or also can comprise the known device in multi-purpose computer.These equipment have storage computer program within it, and these computer programs optionally activate or reconstruct.Such computer program can be stored in equipment (such as, computing machine) in computer-readable recording medium or be stored in and be suitable for store electrons instruction and be coupled in the medium of any type of bus respectively, described computer-readable medium includes but not limited to that the dish of any type (comprises floppy disk, hard disk, CD, CD-ROM, and magneto-optic disk), ROM (Read-Only Memory, ROM (read-only memory)), RAM (Random Access Memory, storer immediately), EPROM (Erasable Programmable Read-Only Memory, Erarable Programmable Read only Memory), EEPROM (Electrically Erasable ProgrammableRead-Only Memory, EEPROM (Electrically Erasable Programmable Read Only Memo)), flash memory, magnetic card or light card.Namely, computer-readable recording medium comprises and being stored or any medium of transmission information with the form that can read by equipment (such as, computing machine).
Those skilled in the art of the present technique are appreciated that the combination that can realize the frame in each frame in these structural drawing and/or block diagram and/or flow graph and these structural drawing and/or block diagram and/or flow graph with computer program instructions.Those skilled in the art of the present technique are appreciated that, the processor that these computer program instructions can be supplied to multi-purpose computer, special purpose computer or other programmable data disposal routes realizes, thus is performed the scheme of specifying in the frame of structural drawing disclosed by the invention and/or block diagram and/or flow graph or multiple frame by the processor of computing machine or other programmable data disposal routes.
Those skilled in the art of the present technique are appreciated that various operations, method, the step in flow process, measure, the scheme discussed in the present invention can be replaced, changes, combines or delete.Further, there is various operations, method, other steps in flow process, measure, the scheme discussed in the present invention also can be replaced, change, reset, decompose, combine or delete.Further, of the prior art have also can be replaced with the step in operation various disclosed in the present invention, method, flow process, measure, scheme, changed, reset, decomposed, combined or deleted.
The above is only some embodiments of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.
Claims (10)
1. a method for accession page, is characterized in that, comprising:
Send accessing page request to web server, wherein, described accessing page request comprises the first page identifier of the page;
Receive the page data information that described web server returns, judge whether described page data information comprises the appended document of the described page;
When judging that described page data information only comprises the agent structure file of the described page, obtain the appended document of the local described page prestored; And
According to the agent structure file of the described page and the appended document of the local described page prestored, determine complete page surface information and show the described page.
2. the method for accession page according to claim 1, is characterized in that, the step obtaining the appended document of the local described page stored comprises further:
Read the string data that prestores of the local described page stored; And
Conversion process is carried out to the described string data that prestores, to determine the attachment files of the described page that this locality prestores.
3. the method for accession page according to claim 1 and 2, is characterized in that, described method comprises further:
Judge whether the described page data information that described web server returns comprises the agent structure file of the described page and upgrade appended document;
When the described page data information that described web server returns comprises the agent structure file of the described page and upgrades appended document, load the agent structure file of the described page that described page data information comprises and upgrade appended document, to show the described page; And
According to described renewal appended document, upgrade the appended document of the local described page prestored.
4. the method for the accession page according to any one of claim 1-3, is characterized in that, described method comprises further:
According to the second page identifier of the described page that described web server returns, upgrade the first page identifier of the local described page stored.
5. the method for the accession page according to any one of claim 1-4, is characterized in that, the agent structure file of the page comprises html file, and the appended document that prestores of the page comprises CSS file and JavaScript script file with renewal appended document.
6. the method for the accession page according to any one of claim 1-5, is characterized in that, described method comprises further:
When judging that described page data information only comprises the agent structure file of the described page, and obtaining the appended document failure that prestores of the local described page stored, again sending the accessing page request of the described page to described web server;
Receive the agent structure file comprising the described page that described web server returns and the page data information upgrading appended document.
7. the method for the accession page according to any one of claim 1-6, is characterized in that, described first page identifier is the page identifier corresponding to the appended document of the described page that this locality prestores.
8. a method for accession page, is characterized in that, comprising:
Receive the accessing page request that subscriber equipment sends, wherein, described accessing page request comprises the first page identifier of the page;
Determine the second page identifier of the corresponding page of described accessing page request, described second page identifier and described first page identifier are contrasted; And
When described second page identifier is identical with described first page identifier, return the page data information of the agent structure file comprising the described page to described subscriber equipment.
9. a device for accession page, is characterized in that, comprising:
Request sending module, for sending accessing page request to web server, wherein, described accessing page request comprises the first page identifier of the page;
First judge module, for receiving the page data information that described web server returns, judges whether described page data information comprises the appended document of the described page;
Prestore file acquisition module, for when judging that described page data information only comprises the agent structure file of the described page, obtains the appended document of the local described page prestored; And
First display module, for according to the agent structure file of the described page and the appended document of the local described page prestored, determines complete page surface information and shows the described page.
10. a device for accession page, is characterized in that, comprising:
Request receiving module, for receiving the accessing page request that subscriber equipment sends, wherein, described accessing page request comprises the first page identifier of the page;
Second mark determination module, for determining the second page identifier of the corresponding page of described accessing page request, contrasts described second page identifier and described first page identifier; And
First returns module, for when described second page identifier is identical with described first page identifier, returns the page data information of the agent structure file comprising the described page to described subscriber equipment.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410832070.3A CN104516973B (en) | 2014-12-26 | 2014-12-26 | The method and apparatus of accession page |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410832070.3A CN104516973B (en) | 2014-12-26 | 2014-12-26 | The method and apparatus of accession page |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104516973A true CN104516973A (en) | 2015-04-15 |
CN104516973B CN104516973B (en) | 2019-03-05 |
Family
ID=52792272
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410832070.3A Active CN104516973B (en) | 2014-12-26 | 2014-12-26 | The method and apparatus of accession page |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104516973B (en) |
Cited By (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105005596A (en) * | 2015-07-02 | 2015-10-28 | 深圳市信锐网科技术有限公司 | Page display method and page display device |
CN105871980A (en) * | 2015-12-01 | 2016-08-17 | 乐视体育文化产业发展(北京)有限公司 | Method and device for increasing cache hit ratio |
CN106100936A (en) * | 2016-08-10 | 2016-11-09 | 乐视控股(北京)有限公司 | Webpage method for monitoring performance and device and the webserver, client |
CN106528578A (en) * | 2015-09-15 | 2017-03-22 | 阿里巴巴集团控股有限公司 | An information display method and device |
CN106790635A (en) * | 2017-01-06 | 2017-05-31 | 聚好看科技股份有限公司 | Cookie information management method and server |
CN106874173A (en) * | 2015-12-10 | 2017-06-20 | 阿里巴巴集团控股有限公司 | The method of testing and device of Page Template |
CN107229633A (en) * | 2016-03-24 | 2017-10-03 | 北京神州泰岳软件股份有限公司 | Static page generation method, Web access method and device |
CN107580053A (en) * | 2017-09-08 | 2018-01-12 | 阿里巴巴集团控股有限公司 | Method for exhibiting data, device, client and system |
CN108459890A (en) * | 2017-02-20 | 2018-08-28 | 百度在线网络技术(北京)有限公司 | Interface display method and device for application |
CN108460053A (en) * | 2017-02-20 | 2018-08-28 | 平安科技(深圳)有限公司 | File memory method and device |
CN108681550A (en) * | 2018-03-30 | 2018-10-19 | 北京奇艺世纪科技有限公司 | Page furbishing method, the control method of device and page furbishing, device |
CN109948094A (en) * | 2017-10-17 | 2019-06-28 | 中移(苏州)软件技术有限公司 | A kind of WEB page loading method and device |
CN110334297A (en) * | 2018-03-08 | 2019-10-15 | 腾讯科技(深圳)有限公司 | Loading method, terminal, server and the storage medium of terminal page |
CN110892430A (en) * | 2017-06-29 | 2020-03-17 | 微软技术许可有限责任公司 | Analysis and data visualization through file attachments |
CN111079048A (en) * | 2019-12-04 | 2020-04-28 | 北京达佳互联信息技术有限公司 | Page loading method and device |
CN111309471A (en) * | 2018-12-11 | 2020-06-19 | 迈普通信技术股份有限公司 | Data processing method and device and distributed system |
WO2020187099A1 (en) * | 2019-03-20 | 2020-09-24 | 海信视像科技股份有限公司 | Page update method and display device |
US11200294B2 (en) | 2019-03-20 | 2021-12-14 | Hisense Visual Technology Co., Ltd. | Page updating method and display device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101668042A (en) * | 2009-09-10 | 2010-03-10 | 深圳市同洲电子股份有限公司 | Method and device for updating local page of embedded communication system |
CN101997927A (en) * | 2010-11-18 | 2011-03-30 | 厦门市美亚柏科信息股份有限公司 | Method and system for caching data of WEB platform |
CN104216695A (en) * | 2013-06-03 | 2014-12-17 | 阿里巴巴集团控股有限公司 | Method and system for providing webpage information to be displayed on webpage and displaying webpage information |
-
2014
- 2014-12-26 CN CN201410832070.3A patent/CN104516973B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101668042A (en) * | 2009-09-10 | 2010-03-10 | 深圳市同洲电子股份有限公司 | Method and device for updating local page of embedded communication system |
CN101997927A (en) * | 2010-11-18 | 2011-03-30 | 厦门市美亚柏科信息股份有限公司 | Method and system for caching data of WEB platform |
CN104216695A (en) * | 2013-06-03 | 2014-12-17 | 阿里巴巴集团控股有限公司 | Method and system for providing webpage information to be displayed on webpage and displaying webpage information |
Cited By (28)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105005596B (en) * | 2015-07-02 | 2018-10-30 | 深圳市信锐网科技术有限公司 | page display method and device |
CN105005596A (en) * | 2015-07-02 | 2015-10-28 | 深圳市信锐网科技术有限公司 | Page display method and page display device |
CN106528578B (en) * | 2015-09-15 | 2020-05-08 | 阿里巴巴集团控股有限公司 | Information display method and device |
CN106528578A (en) * | 2015-09-15 | 2017-03-22 | 阿里巴巴集团控股有限公司 | An information display method and device |
CN105871980A (en) * | 2015-12-01 | 2016-08-17 | 乐视体育文化产业发展(北京)有限公司 | Method and device for increasing cache hit ratio |
CN106874173A (en) * | 2015-12-10 | 2017-06-20 | 阿里巴巴集团控股有限公司 | The method of testing and device of Page Template |
CN107229633A (en) * | 2016-03-24 | 2017-10-03 | 北京神州泰岳软件股份有限公司 | Static page generation method, Web access method and device |
CN106100936A (en) * | 2016-08-10 | 2016-11-09 | 乐视控股(北京)有限公司 | Webpage method for monitoring performance and device and the webserver, client |
CN106790635A (en) * | 2017-01-06 | 2017-05-31 | 聚好看科技股份有限公司 | Cookie information management method and server |
CN106790635B (en) * | 2017-01-06 | 2020-11-24 | 聚好看科技股份有限公司 | Cookie information management method and server |
CN108459890A (en) * | 2017-02-20 | 2018-08-28 | 百度在线网络技术(北京)有限公司 | Interface display method and device for application |
CN108460053A (en) * | 2017-02-20 | 2018-08-28 | 平安科技(深圳)有限公司 | File memory method and device |
CN108459890B (en) * | 2017-02-20 | 2021-10-26 | 百度在线网络技术(北京)有限公司 | Interface display method and device for application |
CN110892430B (en) * | 2017-06-29 | 2023-10-13 | 微软技术许可有限责任公司 | Analysis and data visualization through file attachments |
CN110892430A (en) * | 2017-06-29 | 2020-03-17 | 微软技术许可有限责任公司 | Analysis and data visualization through file attachments |
CN107580053A (en) * | 2017-09-08 | 2018-01-12 | 阿里巴巴集团控股有限公司 | Method for exhibiting data, device, client and system |
CN109948094B (en) * | 2017-10-17 | 2021-07-23 | 中移(苏州)软件技术有限公司 | WEB page loading method and device |
CN109948094A (en) * | 2017-10-17 | 2019-06-28 | 中移(苏州)软件技术有限公司 | A kind of WEB page loading method and device |
CN110334297A (en) * | 2018-03-08 | 2019-10-15 | 腾讯科技(深圳)有限公司 | Loading method, terminal, server and the storage medium of terminal page |
CN110334297B (en) * | 2018-03-08 | 2024-03-01 | 腾讯科技(深圳)有限公司 | Terminal page loading method, terminal, server and storage medium |
CN108681550B (en) * | 2018-03-30 | 2021-05-25 | 北京奇艺世纪科技有限公司 | Page refreshing method and device and page refreshing control method and device |
CN108681550A (en) * | 2018-03-30 | 2018-10-19 | 北京奇艺世纪科技有限公司 | Page furbishing method, the control method of device and page furbishing, device |
CN111309471A (en) * | 2018-12-11 | 2020-06-19 | 迈普通信技术股份有限公司 | Data processing method and device and distributed system |
CN111309471B (en) * | 2018-12-11 | 2024-02-09 | 迈普通信技术股份有限公司 | Data processing method, device and distributed system |
WO2020187099A1 (en) * | 2019-03-20 | 2020-09-24 | 海信视像科技股份有限公司 | Page update method and display device |
US11200294B2 (en) | 2019-03-20 | 2021-12-14 | Hisense Visual Technology Co., Ltd. | Page updating method and display device |
CN111079048A (en) * | 2019-12-04 | 2020-04-28 | 北京达佳互联信息技术有限公司 | Page loading method and device |
CN111079048B (en) * | 2019-12-04 | 2023-11-28 | 北京达佳互联信息技术有限公司 | Page loading method and device |
Also Published As
Publication number | Publication date |
---|---|
CN104516973B (en) | 2019-03-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104516973A (en) | Method and device for accessing page | |
CN108804707B (en) | Page processing method and device and related equipment | |
CN105049486B (en) | Method for edition management, the apparatus and system of static file | |
WO2018223717A1 (en) | Webpage front-end testing method, device, system, apparatus and readable storage medium | |
US9064029B2 (en) | Dynamically identifying and evaluating component hierarchy for rendering content components on a webpage | |
CN106649395B (en) | Webpage updating method and device | |
US20120254721A1 (en) | Methods and systems for generating and displaying a preview image of a content area | |
WO2016026384A1 (en) | Client page display method, device and system | |
CN102306174B (en) | Method and equipment for interacting with user based on web page elements | |
CN103873502A (en) | Cache updating method and system, and update resource providing method and system | |
US8650474B2 (en) | Methods for web content optimization in single page display environments and systems thereof | |
US8516041B1 (en) | Pre-fetching asynchronously requested content | |
CN103139279A (en) | File access method and system | |
CN103152367A (en) | Cache dynamic maintenance updating method and system | |
CN106951270B (en) | Code processing method, system and server | |
CN102882974A (en) | Method for saving website access resource by website identification version number | |
EP3528474B1 (en) | Webpage advertisement anti-shielding methods and content distribution network | |
CN110929183A (en) | Data processing method, device and machine readable medium | |
CN102752371A (en) | Method for achieving splash on client side and client side | |
US20230237531A1 (en) | Methods, systems, and media for dynamically detecting mobile environment information | |
CN108920203A (en) | A kind of page loading method and equipment | |
CN110321278B (en) | System testing method and device, computer equipment and storage medium | |
CN107451163B (en) | Animation display method and device | |
US10095791B2 (en) | Information search method and apparatus | |
JP2013168156A (en) | Determination of standby time of content server |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20220720 Address after: Room 801, 8th floor, No. 104, floors 1-19, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing 100015 Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd. Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park) Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd. Patentee before: Qizhi software (Beijing) Co.,Ltd. |
|
TR01 | Transfer of patent right |