CN109190072A - A kind of method and apparatus sending web page resources - Google Patents

A kind of method and apparatus sending web page resources Download PDF

Info

Publication number
CN109190072A
CN109190072A CN201811089887.0A CN201811089887A CN109190072A CN 109190072 A CN109190072 A CN 109190072A CN 201811089887 A CN201811089887 A CN 201811089887A CN 109190072 A CN109190072 A CN 109190072A
Authority
CN
China
Prior art keywords
resource
target
client
additional resource
additional
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
CN201811089887.0A
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.)
Wangsu Science and Technology Co Ltd
Original Assignee
Wangsu Science and Technology 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 Wangsu Science and Technology Co Ltd filed Critical Wangsu Science and Technology Co Ltd
Priority to CN201811089887.0A priority Critical patent/CN109190072A/en
Publication of CN109190072A publication Critical patent/CN109190072A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a kind of method and apparatus for sending web page resources, belong to technical field of data transmission.The described method includes: receiving the web page browsing request for the target webpage that client is sent, obtain the cookie for the target webpage affiliated web site that the web page browsing request carries, wherein, the cookie includes the resource identification information of the additional resource for the target webpage that the client has cached;According to the resource identification information that the additional resource list for the target webpage being locally stored and the cookie include, the target additional resource of the not stored target webpage of the client is determined;The target additional resource is sent to the client, and sends the resource identification information of the target additional resource to the client by set-cookie head response.Using the present invention, it is possible to reduce the bandwidth resources consumed when sending web page resources.

Description

A kind of method and apparatus sending web page resources
Technical field
The present invention relates to technical field of data transmission, in particular to a kind of method and apparatus for sending web page resources.
Background technique
With the continuous development of Internet technology, the performance of HTTP/1.x agreement can no longer meet universal internet and visit Ask demand, in order to solve the problems, such as that HTTP/1.X is brought, HTTP/2 agreement is devised and is widely used.Wherein, " server push " is a more crucial function of HTTP/2 agreement, can effectively improve the acquisition speed of web page resources Degree, so as to shorten web page loading time.
Under normal circumstances, after user end to server sends web page browsing request, server can return to net to client The homepage resource of page, client can parse homepage resource, determine the additional resource of webpage (as needed for webpage load Picture, table and script etc.), then these additional resources are requested to server again.And under server push mode, server After the homepage resource for returning to webpage to client, it is not necessarily to client request, can directly be given additional resource active push Client, in this way, client can quickly obtain additional resource and complete the load of webpage.
In the implementation of the present invention, the inventor finds that the existing technology has at least the following problems:
For cacheable static additional resource, client, can be by additional resource after requested primary additional resource Be buffered in local, when it is subsequent need to load the additional resource when, client no longer need to server request.However server is pushing away , still can be by the additional resource active push to client when sending the additional resource of webpage, therefore will cause biggish bandwidth money Source waste.
Summary of the invention
In order to solve problems in the prior art, the embodiment of the invention provides a kind of methods and dress for sending web page resources It sets.The technical solution is as follows:
In a first aspect, providing a kind of method for sending web page resources, which comprises
The web page browsing request for receiving the target webpage that client is sent obtains the described of the web page browsing request carrying The cookie of target webpage affiliated web site, wherein the cookie includes the target webpage that the client has cached The resource identification information of additional resource;
The resource identification letter for including according to the additional resource list for the target webpage being locally stored and the cookie Breath, determines the target additional resource of the not stored target webpage of the client;
The target additional resource is sent to the client, and is sent out by set-cookie head response to the client Send the resource identification information of the target additional resource.
Optionally, the additional resource list for the target webpage that the basis is locally stored and the cookie include Resource identification information determines the target additional resource of the not stored target webpage of the client, comprising:
Each additional resource of target webpage is generated according to the additional resource list for the target webpage being locally stored Resource identification information;
In the resource identification information of each additional resource, the target resource identification that the cookie does not include is determined Information;
The corresponding additional resource of the target resource identification information is determined as the not stored target of the client The target additional resource of webpage.
Optionally, the method also includes:
According to the storage duration of the target additional resource, having for the resource identification information of the target additional resource is set Imitate duration.
Optionally, after the web page browsing request for receiving the target webpage that client is sent, further includes:
The homepage resource of the target webpage is sent to the client, so that the client is based on the homepage Resource determines the additional resource of the target webpage;
The acquisition request for receiving the additional resource A for the target webpage that the client is sent is sent out to the client Send the additional resource A.
Optionally, after the additional resource A to client transmission, further includes:
Key message based on the additional resource A generates the resource identification information of the additional resource A, passes through set- Cookie head response sends the resource identification information of the additional resource A to the client.
Optionally, before the target additional resource to client transmission, further includes:
The resource identification of the target additional resource is sent to the client, so that the client is requesting the mesh When marking the additional resource of webpage, the target additional resource is skipped according to the resource identification.
Optionally, it after the target additional resource of the not stored target webpage of the determination client, also wraps It includes:
Local not stored and to be updated additional resource is determined in the target additional resource, from the target webpage Source station server obtains the not stored and to be updated additional resource in the local.
Second aspect, provides a kind of device for sending web page resources, and described device includes:
Module is obtained, the web page browsing request of the target webpage for receiving client transmission obtains the web page browsing Request the cookie of the target webpage affiliated web site carried, wherein the cookie includes what the client had cached The resource identification information of the additional resource of the target webpage;
Determining module, for including according to the additional resource list and the cookie for the target webpage being locally stored Resource identification information, determine the target additional resource of the not stored target webpage of the client;
Sending module for sending the target additional resource to the client, and passes through set-cookie head response The resource identification information of the target additional resource is sent to the client.
Optionally, the determining module, is specifically used for:
Each additional resource of target webpage is generated according to the additional resource list for the target webpage being locally stored Resource identification information;
In the resource identification information of each additional resource, the target resource identification that the cookie does not include is determined Information;
The corresponding additional resource of the target resource identification information is determined as the not stored target of the client The target additional resource of webpage.
Optionally, described device further include:
Setup module, for the resource of the target additional resource to be arranged according to the storage duration of the target additional resource The effective time of identification information.
Optionally, the sending module, is also used to:
The homepage resource of the target webpage is sent to the client, so that the client is based on the homepage Resource determines the additional resource of the target webpage;
The acquisition request for receiving the additional resource A for the target webpage that the client is sent is sent out to the client Send the additional resource A.
Optionally, the sending module, is also used to:
Key message based on the additional resource A generates the resource identification information of the additional resource A, passes through set- Cookie head response sends the resource identification information of the additional resource A to the client.
Optionally, the sending module, is also used to:
The resource identification of the target additional resource is sent to the client, so that the client is requesting the mesh When marking the additional resource of webpage, the target additional resource is skipped according to the resource identification.
Optionally, the acquisition module, is also used to:
Local not stored and to be updated additional resource is determined in the target additional resource, from the target webpage Source station server obtains the not stored and to be updated additional resource in the local.
The third aspect, provides a kind of network equipment, and the network equipment includes processor and memory, the memory In be stored at least one instruction, at least one section of program, code set or instruction set, at least one instruction, described at least one Duan Chengxu, the code set or instruction set are loaded by the processor and are executed to realize transmission webpage as described in relation to the first aspect The method of resource.
Fourth aspect provides a kind of computer readable storage medium, at least one finger is stored in the storage medium Enable, at least one section of program, code set or instruction set, at least one instruction, at least one section of program, the code set or The method that instruction set is loaded by processor and executed to realize transmission web page resources as described in relation to the first aspect.
Technical solution provided in an embodiment of the present invention has the benefit that
In the embodiment of the present invention, the web page browsing request for the target webpage that client is sent is received, web page browsing is obtained and asks Seek the cookie of the target webpage affiliated web site of carrying, wherein cookie includes the additional of the target webpage that client has cached The resource identification information of resource;The resource identification for including according to the additional resource list for the target webpage being locally stored and cookie Information determines the target additional resource of the not stored target webpage of client;Target additional resource is sent to client, and is passed through Set-cookie head response sends the resource identification information of target additional resource to client.In this way, server is to client When pushing the additional resource of webpage, letter can be recognized according to the resource in the cookie for the webpage affiliated web site that client provides Breath, to screen the not stored additional resource of client, so as to only to these additional resources of client push, without pushing The stored additional resource of client, so the bandwidth resources consumed when sending web page resources can be reduced.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other Attached drawing.
Fig. 1 is a kind of network frame figure for sending web page resources provided in an embodiment of the present invention;
Fig. 2 is a kind of method flow diagram for sending web page resources provided in an embodiment of the present invention;
Fig. 3 is a kind of apparatus structure schematic diagram for sending web page resources provided in an embodiment of the present invention;
Fig. 4 is a kind of apparatus structure schematic diagram for sending web page resources provided in an embodiment of the present invention;
Fig. 5 is a kind of structural schematic diagram of server provided in an embodiment of the present invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention Formula is described in further detail.
The embodiment of the invention provides a kind of method for sending web page resources, the executing subject of this method can be service Device, network frame can be as shown in Figure 1, wherein server can be the edge node server of CDN cluster, and server can be with Web page resources are obtained from the source station of each webpage by CDN Intranet, and web page resources are stored in local, when receiving client The corresponding web page resources being locally stored can be fed back to client by the web page browsing request for some webpage.Server It can support HTTP/2 agreement, and be carried out data transmission by HTTP/2 agreement with client.Server may include processor, Memory and transceiver, processor can be used for carrying out executing the processing for sending web page resources in following processes, and memory can be with For storing the data of the data and generation that need in treatment process, such as the additional resource list of webpage, web page resources, receive Hair device can be used for sending and receiving the related data in treatment process, such as receive request feedback resources.The present embodiment institute is public The scheme opened applies also for any CDN node server for supporting HTTP/2 agreement, and CDN node server can be with junior CDN Node server carries out data interaction, and in interactive process, junior's CDN node server will play the part of the angle of above-mentioned client Color.Following to be illustrated so that server is edge node server as an example, other situations are similar therewith, will be at necessary place Row is described in detail.
Below in conjunction with specific embodiment, process flow shown in Fig. 2 is described in detail, content can be as Under:
Step 201, the web page browsing request for receiving the target webpage that client is sent obtains what web page browsing request carried The cookie of target webpage affiliated web site.
Wherein, cookie includes the resource identification information of the additional resource for the target webpage that client has cached.
In an implementation, it after client passes through the browser load webpage installed on it, be adjusted when can will load webpage Picture, table, script etc. partly or entirely additional resource storage in the client, in this way, next time load the webpage or When other webpages, if calling above-mentioned additional resource if necessary, then without being downloaded again from source station server, and can be direct Call locally stored additional resource.Meanwhile client can safeguard the cookie of above-mentioned webpage affiliated web site, it should The resource identification information of the additional resource of the target webpage cached in cookie comprising client.When user wants to browse some When webpage (such as target webpage), target can be sent to the source station server of target webpage by the browser installed in client The web page browsing of webpage is requested, and the cookie of target webpage affiliated web site can be carried in web page browsing request.If mesh Mark webpage affiliated web site has opened CDN and has accelerated service, and the edge node server of CDN cluster will receive client transmission The web page browsing of target webpage is requested, the target webpage affiliated web site then carried in available web page browsing request cookie。
Step 202, the resource identification letter for including according to the additional resource list for the target webpage being locally stored and cookie Breath, determines the target additional resource of the not stored target webpage of client.
In an implementation, the edge node server of CDN cluster is in the target webpage affiliated web site for getting client and sending Cookie after, the additional resource list for the target webpage being locally stored can be searched, can be remembered in the additional resource list All additional resources that record has client required when loading target webpage.The additional resource list of target webpage can be by CDN The technical staff of the source station server side of cluster side or target webpage is pre-set in edge node server, is also possible to Edge node server is when responding acquisition request of any client for the additional resource of target webpage, according to acquisition request Generation is automatically recorded, can also be edge node server according to the target network of the source station server active push of target webpage Page additional resource and automatically record generation.Later, edge node server can be according to the target webpage being locally stored The resource identification information that additional resource list and cookie include, judges in the additional resource of target webpage, client is not yet deposited The target additional resource of storage.
Optionally, determine that the processing of the not stored target additional resource of client specifically can be such that basis in step 202 The additional resource list for the target webpage being locally stored generates the resource identification information of each additional resource of target webpage;Every In the resource identification information of a additional resource, the target resource identification information that cookie does not include is determined;Target resource is recognized The corresponding additional resource of information is determined as the target additional resource of the not stored target webpage of client.
In an implementation, edge node server can first search the additional resource list for the target webpage being locally stored, should It can recorde the key message of each additional resource in additional resource list, later, edge node server can be according to this A little key messages generate the resource identification information of each additional resource of target webpage, the key of the additional resource in the present embodiment Information can be the download address and Etag information of additional resource, can by hash algorithm to the key message of additional resource into Row compression, to generate the resource identification information of additional resource.Next, edge node server can be attached in each of generation Add in the resource identification information of resource, the resource identification information that the cookie obtained in step 201 includes is rejected, so as to true Determine the target resource identification information that cookie does not include, then the corresponding additional resource of target resource identification information is determined as client Hold the target additional resource of not stored target webpage.
Step 203, target additional resource is sent to client, and mesh is sent to client by set-cookie head response Mark the resource identification information of additional resource.
Wherein, Set-Cookie head response is to be arranged in the browser of client as defined in http agreement for server The head response of cookie.
In an implementation, edge node server the target additional resource that the not stored target webpage of client has been determined it Afterwards, target additional resource actively can be sent to client before receiving client for the request of target additional resource, The resource identification information that target additional resource can also be generated according to the key message of target additional resource simultaneously, then passes through Set-cookie head response sends the resource identification information of target additional resource to client, so that client is in target network The resource identification information of target additional resource is added in the cookie of page affiliated web site.
Optionally, each resource identification information has respectively different effective times, correspondingly, sending resource identification Before information, there may be following processing: being recognized according to the resource that target additional resource is arranged in the storage duration of target additional resource The effective time of information.
In an implementation, client, can depositing according to preset additional resource after getting the additional resource of webpage A period of time is being locally stored in additional resource by storage duration, then can be by corresponding additional resource after the storage duration It deletes.In this way, edge node server can recognize the resource after the resource identification information for generating target additional resource The effective time of information is set as the storage duration of target additional resource, so that client is in delete target additional resource, it can With the resource identification information of target additional resource in the cookie of delete target webpage affiliated web site simultaneously, so that target webpage institute The cookie for belonging to website can more accurately reflect client for the storage condition of the additional resource of target webpage.
It optionally, can be with customer in response end for additional resource while active sends additional resource to client Activly request, corresponding processing can be such that the homepage resource that target webpage is sent to client, so that client is based on Homepage resource determines the additional resource of target webpage;The acquisition for receiving the additional resource A for the target webpage that client is sent is asked It asks, sends additional resource A to client.
In an implementation, edge node server requests it in the web page browsing for the target webpage for receiving client transmission Afterwards, the homepage resource of target webpage can be sent to client.In this way, client receives the homepage resource of target webpage Afterwards, it can be parsed, all additional resources needed for determining load target webpage, and is asked to edge node server Seek wherein local not stored additional resource.Specifically, by taking additional resource A as an example, if client is not stored additional resource A, then can send the acquisition request of additional resource A to edge node server, and edge node server is receiving the acquisition After request, additional resource A can be sent to client.It should be noted that edge node server is to client push The processing of additional resource can be carried out with client to the processing of edge node server request additional resource simultaneously.
Optionally, it after the request for answering client sends additional resource, also needs to update relevant cookie, specifically Processing can be such that the key message based on additional resource A generates the resource identification information of additional resource A, pass through set- Cookie head response sends the resource identification information of additional resource A to client.
In an implementation, edge node server receives client for the acquisition request of additional resource A, and to client After sending additional resource A, the resource identification information of additional resource A can be generated based on the key message of additional resource A, then The resource identification information of additional resource A can be sent to client by set-cookie head response.Certainly, fringe node service The effective time of the resource identification information of additional resource A can also be arranged in device according to the storage duration of additional resource A.
Optionally, before pushing additional resource, client can be informed in advance, repeat to transmit to avoid resource, accordingly Processing can be such that the resource identification that target additional resource is sent to client, so that client is in the attached of request target webpage When adding resource, target additional resource is skipped according to resource identification.
In an implementation, edge node server, can be first to client before sending target additional resource to client Send target additional resource resource identification, the resource identification can by for target additional resource sending out notice in the form of into Row is sent.Client can receive and record the resource identification, in this way, client is attached to edge node server request in active When adding resource, the request processing of target additional resource can be skipped according to above-mentioned resource identification.In addition, if client detects It is locally stored to have target additional resource, then it can refuse edge node server and the push of target additional resource is handled, Edge node server receive client transmission the push refuse information for target additional resource after, can stop to Client sends target additional resource.
Optionally, server can obtain local not stored additional resource from source station server, and specific processing can be with It is as follows: local not stored and to be updated additional resource to be determined in target additional resource, from the source station server of target webpage Obtain local not stored and to be updated additional resource.
In an implementation, edge node server the target additional resource that the not stored target webpage of client has been determined it Afterwards, it can detecte and locally whether be stored with target additional resource, and whether the target additional resource stored needs to update.For Local not stored and to be updated additional resource, edge node server can then pass through CDN cluster in target additional resource These additional resources are obtained from the source station server of target webpage.Specifically, edge node server is obtained from source station server The mode of local not stored and to be updated additional resource may include edge node server activly request and source station server Active push.For this mode of edge node server activly request, edge node server can determined locally not After storage and additional resource to be updated, these additional resources are requested to the source station server of target webpage by CDN cluster; For this mode of source station server active push, edge node server sends target network to the source station server of target webpage The resource acquisition request of any cost (can be homepage resource or additional resource) of page, can be with trigger source site server master Trend edge node server pushes all additional resources of target webpage, and edge node server can be according to local target The storage condition of the additional resource of webpage selectively receives the push of the additional resource of target webpage.
It should be noted that edge node server passes through multistage CDN node server and source station server carries out data When interaction, on the one hand, edge node server can determine local not stored and to be updated additional resource (with additional money For the B of source) after, additional resource B is requested to upper level CDN node server, upper level CDN node server can detecte this Whether ground is stored with the additional resource B of latest edition, if stored, can feed back the additional resource B being locally stored, otherwise Continue up a grade CDN node server request additional resource B.On the other hand, edge node server takes to upper level CDN node Business device sends the resource acquisition request of any cost of target webpage, can trigger upper level CDN node server active push All additional resources of its target webpage can be after if upper level CDN node server is not stored certain additional resources Continuous superior CDN node server requests corresponding additional resource, and equally, the request of the additional resource can also trigger higher level CDN node server handles the push of all additional resources of target webpage.And any CDN node server can root According to the storage condition of the additional resource of local target webpage, selectively receive higher level's CDN node server for target webpage Additional resource push.
In the embodiment of the present invention, the web page browsing request for the target webpage that client is sent is received, web page browsing is obtained and asks Seek the cookie of the target webpage affiliated web site of carrying, wherein cookie includes the additional of the target webpage that client has cached The resource identification information of resource;The resource identification for including according to the additional resource list for the target webpage being locally stored and cookie Information determines the target additional resource of the not stored target webpage of client;Target additional resource is sent to client, and is passed through Set-cookie head response sends the resource identification information of target additional resource to client.In this way, server is to client When pushing the additional resource of webpage, letter can be recognized according to the resource in the cookie for the webpage affiliated web site that client provides Breath, to screen the not stored additional resource of client, so as to only to these additional resources of client push, without pushing The stored additional resource of client, so the bandwidth resources consumed when sending web page resources can be reduced.
Based on the same technical idea, the embodiment of the invention also provides a kind of devices for sending web page resources, such as Fig. 3 institute Show, described device includes:
Module 301 is obtained, it is clear to obtain the webpage for the web page browsing request of the target webpage for receiving client transmission Look at request carry the target webpage affiliated web site cookie, wherein the cookie include the client cached The target webpage additional resource resource identification information;
Determining module 302, for according to the additional resource list of the target webpage and the cookie being locally stored The resource identification information for including determines the target additional resource of the not stored target webpage of the client;
Sending module 303 for sending the target additional resource to the client, and is responded by set-cookie Head sends the resource identification information of the target additional resource to the client.
Optionally, the determining module 302, is specifically used for:
Each additional resource of target webpage is generated according to the additional resource list for the target webpage being locally stored Resource identification information;
In the resource identification information of each additional resource, the target resource identification that the cookie does not include is determined Information;
The corresponding additional resource of the target resource identification information is determined as the not stored target of the client The target additional resource of webpage.
Optionally, as shown in figure 4, described device further include:
Setup module 304, for the target additional resource to be arranged according to the storage duration of the target additional resource The effective time of resource identification information.
Optionally, the sending module 303, is also used to:
The homepage resource of the target webpage is sent to the client, so that the client is based on the homepage Resource determines the additional resource of the target webpage;
The acquisition request for receiving the additional resource A for the target webpage that the client is sent is sent out to the client Send the additional resource A.
Optionally, the sending module 303, is also used to:
Key message based on the additional resource A generates the resource identification information of the additional resource A, passes through set- Cookie head response sends the resource identification information of the additional resource A to the client.
Optionally, the sending module 303, is also used to:
The resource identification of the target additional resource is sent to the client, so that the client is requesting the mesh When marking the additional resource of webpage, the target additional resource is skipped according to the resource identification.
Optionally, the acquisition module 301, is also used to:
Local not stored and to be updated additional resource is determined in the target additional resource, from the target webpage Source station server obtains the not stored and to be updated additional resource in the local.
In the embodiment of the present invention, the web page browsing request for the target webpage that client is sent is received, web page browsing is obtained and asks Seek the cookie of the target webpage affiliated web site of carrying, wherein cookie includes the additional of the target webpage that client has cached The resource identification information of resource;The resource identification for including according to the additional resource list for the target webpage being locally stored and cookie Information determines the target additional resource of the not stored target webpage of client;Target additional resource is sent to client, and is passed through Set-cookie head response sends the resource identification information of target additional resource to client.In this way, server is to client When pushing the additional resource of webpage, letter can be recognized according to the resource in the cookie for the webpage affiliated web site that client provides Breath, to screen the not stored additional resource of client, so as to only to these additional resources of client push, without pushing The stored additional resource of client, so the bandwidth resources consumed when sending web page resources can be reduced.
It should be understood that it is provided by the above embodiment send web page resources device when sending web page resources, only with The division progress of above-mentioned each functional module can according to need and for example, in practical application by above-mentioned function distribution by not Same functional module is completed, i.e., the internal structure of device is divided into different functional modules, to complete whole described above Or partial function.In addition, the device provided by the above embodiment for sending web page resources and the method for sending web page resources are implemented Example belongs to same design, and specific implementation process is detailed in embodiment of the method, and which is not described herein again.
Fig. 5 is the structural schematic diagram of server provided in an embodiment of the present invention.The server 500 can because configuration or performance not With and generate bigger difference, may include one or more central processing units 522 (for example, one or more Processor) and memory 532, the storage medium 530 (such as one of one or more storage application programs 542 or data 544 A or more than one mass memory unit).Wherein, memory 532 and storage medium 530 can be of short duration storage or persistently deposit Storage.The program for being stored in storage medium 530 may include one or more modules (diagram does not mark), and each module can be with Including being operated to the series of instructions in server 500.Further, central processing unit 522 can be set to be situated between with storage Matter 530 communicates, and the series of instructions operation in storage medium 530 is executed on server 500.
Server 500 can also include one or more power supplys 529, one or more wired or wireless networks Interface 550, one or more input/output interfaces 558, one or more keyboards 556, and/or, one or one The above operating system 541, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD etc..
Server 500 may include having perhaps one of them or one of more than one program of memory and one Procedure above is stored in memory, and is configured to execute one or one by one or more than one processor Procedure above includes the instruction for carrying out above-mentioned transmission web page resources.
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware It completes, relevant hardware can also be instructed to complete by program, the program can store in a kind of computer-readable In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all in spirit of the invention and Within principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.

Claims (14)

1. a kind of method for sending web page resources, which is characterized in that the described method includes:
The web page browsing request for receiving the target webpage that client is sent obtains the target that the web page browsing request carries The cookie of webpage affiliated web site, wherein the cookie includes the additional of the target webpage that the client has cached The resource identification information of resource;
According to the resource identification information that the additional resource list for the target webpage being locally stored and the cookie include, really The target additional resource of the not stored target webpage of the fixed client;
The target additional resource is sent to the client, and institute is sent to the client by set-cookie head response State the resource identification information of target additional resource.
2. the method according to claim 1, wherein the target webpage that the basis is locally stored is additional The resource identification information that the Resources list and the cookie include determines the mesh of the not stored target webpage of the client Mark additional resource, comprising:
The resource of each additional resource of target webpage is generated according to the additional resource list for the target webpage being locally stored Identification information;
In the resource identification information of each additional resource, the target resource identification letter that the cookie does not include is determined Breath;
The corresponding additional resource of the target resource identification information is determined as the not stored target webpage of the client Target additional resource.
3. the method according to claim 1, wherein the method also includes:
According to the storage duration of the target additional resource be arranged the resource identification information of the target additional resource it is effective when It is long.
4. the method according to claim 1, wherein the webpage for receiving the target webpage that client is sent is clear It lookes at after request, further includes:
The homepage resource of the target webpage is sent to the client, so that the client is based on the homepage resource Determine the additional resource of the target webpage;
The acquisition request for receiving the additional resource A for the target webpage that the client is sent sends institute to the client State additional resource A.
5. according to the method described in claim 4, it is characterized in that, it is described to the client send the additional resource A it Afterwards, further includes:
Key message based on the additional resource A generates the resource identification information of the additional resource A, passes through set-cookie Head response sends the resource identification information of the additional resource A to the client.
6. the method according to claim 1, wherein described send the target additional resource to the client Before, further includes:
The resource identification of the target additional resource is sent to the client, so that the client is requesting the target network When the additional resource of page, the target additional resource is skipped according to the resource identification.
7. the method according to claim 1, wherein the target network that the determination client is not stored After the target additional resource of page, further includes:
Local not stored and to be updated additional resource is determined in the target additional resource, from the source station of the target webpage Server obtains the not stored and to be updated additional resource in the local.
8. a kind of device for sending web page resources, which is characterized in that described device includes:
Module is obtained, the web page browsing request of the target webpage for receiving client transmission obtains the web page browsing request The cookie of the target webpage affiliated web site carried, wherein the cookie has cached described comprising the client The resource identification information of the additional resource of target webpage;
Determining module, the money for including for the additional resource list and the cookie according to the target webpage being locally stored Source identification information determines the target additional resource of the not stored target webpage of the client;
Sending module for sending the target additional resource to the client, and passes through set-cookie head response to institute State the resource identification information that client sends the target additional resource.
9. device according to claim 8, which is characterized in that the determining module is specifically used for:
The resource of each additional resource of target webpage is generated according to the additional resource list for the target webpage being locally stored Identification information;
In the resource identification information of each additional resource, the target resource identification letter that the cookie does not include is determined Breath;
The corresponding additional resource of the target resource identification information is determined as the not stored target webpage of the client Target additional resource.
10. device according to claim 8, which is characterized in that described device further include:
Setup module, the resource for the target additional resource to be arranged according to the storage duration of the target additional resource recognize The effective time of information.
11. device according to claim 8, which is characterized in that the sending module is also used to:
The homepage resource of the target webpage is sent to the client, so that the client is based on the homepage resource Determine the additional resource of the target webpage;
The acquisition request for receiving the additional resource A for the target webpage that the client is sent sends institute to the client State additional resource A.
12. device according to claim 11, which is characterized in that the sending module is also used to:
Key message based on the additional resource A generates the resource identification information of the additional resource A, passes through set-cookie Head response sends the resource identification information of the additional resource A to the client.
13. device according to claim 8, which is characterized in that the sending module is also used to:
The resource identification of the target additional resource is sent to the client, so that the client is requesting the target network When the additional resource of page, the target additional resource is skipped according to the resource identification.
14. device according to claim 8, which is characterized in that the acquisition module is also used to:
Local not stored and to be updated additional resource is determined in the target additional resource, from the source station of the target webpage Server obtains the not stored and to be updated additional resource in the local.
CN201811089887.0A 2018-09-18 2018-09-18 A kind of method and apparatus sending web page resources Pending CN109190072A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811089887.0A CN109190072A (en) 2018-09-18 2018-09-18 A kind of method and apparatus sending web page resources

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811089887.0A CN109190072A (en) 2018-09-18 2018-09-18 A kind of method and apparatus sending web page resources

Publications (1)

Publication Number Publication Date
CN109190072A true CN109190072A (en) 2019-01-11

Family

ID=64908426

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811089887.0A Pending CN109190072A (en) 2018-09-18 2018-09-18 A kind of method and apparatus sending web page resources

Country Status (1)

Country Link
CN (1) CN109190072A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114065082A (en) * 2021-11-30 2022-02-18 中国建设银行股份有限公司 Webpage resource caching method, device and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104796439A (en) * 2014-01-16 2015-07-22 腾讯科技(深圳)有限公司 Webpage pushing method, webpage pushing client, webpage pushing server and webpage pushing system
WO2015165034A1 (en) * 2014-04-29 2015-11-05 华为技术有限公司 Webpage loading method and device
CN106790334A (en) * 2015-11-25 2017-05-31 广州市动景计算机科技有限公司 A kind of page data transmission method and system
US20170199850A1 (en) * 2016-01-13 2017-07-13 Samsung Electronics Co., Ltd. Method and system to decrease page load time by leveraging network latency

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104796439A (en) * 2014-01-16 2015-07-22 腾讯科技(深圳)有限公司 Webpage pushing method, webpage pushing client, webpage pushing server and webpage pushing system
WO2015165034A1 (en) * 2014-04-29 2015-11-05 华为技术有限公司 Webpage loading method and device
CN106790334A (en) * 2015-11-25 2017-05-31 广州市动景计算机科技有限公司 A kind of page data transmission method and system
US20170199850A1 (en) * 2016-01-13 2017-07-13 Samsung Electronics Co., Ltd. Method and system to decrease page load time by leveraging network latency

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
洪洲,等: "《基于.NET的Web前台开发技术》", 31 July 2013 *
马晓敏,等: "《Java网络编程原理与JSP Web开发核心技术》", 31 August 2018 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114065082A (en) * 2021-11-30 2022-02-18 中国建设银行股份有限公司 Webpage resource caching method, device and system

Similar Documents

Publication Publication Date Title
US10110695B1 (en) Key resource prefetching using front-end optimization (FEO) configuration
CN106489145B (en) Access method, device and the Web site system of web site
US9009222B2 (en) Verifying the transfer of a data file
CN106105160B (en) Prefetch the application data for disconnecting the period
US20150128121A1 (en) Dynamic application version selection
CN105100294B (en) Obtain method, system, the webserver, browser and the GSLB of webpage
US8838679B2 (en) Providing state service for online application users
JP2014532213A (en) Network resource download information sharing control system and method
CN111614736A (en) Network content resource scheduling method, domain name scheduling server and electronic equipment
US20100179873A1 (en) Displaying Online Advertisements
CN105868231A (en) Cache data updating method and device
CN105897850A (en) Response processing method and system and scheduling proxy server for CDN platform
CN109218362A (en) A kind of internet content distribution method, device and system
CN110493350A (en) File uploading method and device, electronic equipment and computer-readable medium
CN107181779A (en) Processing method, the device and system of access request
CN108701130A (en) Hints model is updated using auto-browsing cluster
CN104335524A (en) Common web accessible data store for client side page processing
CN105959358A (en) CDN server and method of CDN server of caching data
CN105978936A (en) CDN server and data caching method thereof
CN107197359A (en) Video file caching method and device
US20140006918A1 (en) Method and system for web page rearrangement
CN111294372A (en) Method, device and system for realizing cache in proxy server
CN105279156B (en) Network information communication means and network information browsing apparatus
CN109522501A (en) Content of pages management method and its device
CN109617966A (en) A kind of cloud pipe Platform deployment system and method based on Openstack

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination