CN108964975A - Cross-domain access processing method and device - Google Patents
Cross-domain access processing method and device Download PDFInfo
- Publication number
- CN108964975A CN108964975A CN201810543057.4A CN201810543057A CN108964975A CN 108964975 A CN108964975 A CN 108964975A CN 201810543057 A CN201810543057 A CN 201810543057A CN 108964975 A CN108964975 A CN 108964975A
- Authority
- CN
- China
- Prior art keywords
- domain
- resource
- cross
- url
- internet resources
- 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/0813—Configuration setting characterised by the conditions triggering a change of settings
- H04L41/082—Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
- Stored Programmes (AREA)
Abstract
The embodiment of the present invention provides a kind of cross-domain access processing method and device, this method includes the access request to the second domain resource for receiving user and sending on the first domain page, it include the URL of the second domain resource in access request, cross-domain access request is sent to the second domain server according to URL, receive the cross-domain access response of the second domain server transmission, it include Internet resources corresponding with URL in cross-domain access response, plug-in resource corresponding with Internet resources is obtained, and loaded and displayed is carried out to Internet resources and plug-in resource.It is able to carry out smooth upgrade in user's use process, reduces lower deployment cost, improves user experience.
Description
Technical field
The present invention relates to field of computer technology more particularly to a kind of cross-domain access processing methods and device.
Background technique
The javascript of other domain name websites cannot be executed as caused by the origin policy of browser based on security reason
Script, cross-domain access are exactly the javascript script not subject to this restriction for calling other domain name websites.Currently, if will be in mesh
A kind of scripting language (Javascript, abbreviation JS) code that customization is executed in mark Web site needs to carry out the cross-domain execution of JS.It is clear
Device of looking at loads local JS code by plug-in unit and executes on target Web site, or passes through Nginx or similar product reverse proxy
Cross-domain execution is realized in a manner of same area.However, this load local code by browser plug-in, when JS code function updates
And it when pin function upgrading, needs user to carry out manual maintenance, increases lower deployment cost, reduce user experience.
Summary of the invention
The present invention provides a kind of cross-domain access processing method and device, above-mentioned is loaded by browser plug-in for solving
Local code needs user to carry out manual maintenance, increases and be deployed to when JS code function updates and pin function upgrades
Originally, the problem of reducing user experience.
First aspect present invention provides a kind of cross-domain access processing method, comprising:
The access request to the second domain resource that user sends on the first domain page is received, includes in the access request
The URL of second domain resource;
Cross-domain access request is sent to the second domain server according to the URL;
Receive the cross-domain access response that second domain server is sent, in the cross-domain access response comprising with it is described
The corresponding Internet resources of URL;
Plug-in resource corresponding with the Internet resources is obtained, and it is aobvious to carry out load to the Internet resources and plug-in resource
Show.
It is optionally, described to obtain plug-in resource corresponding with the Internet resources, comprising:
Determine whether the plug-in resource corresponding with the Internet resources being locally stored needs to update;
If not needing to update, obtain described in the plug-in resource corresponding with the Internet resources that is locally stored.
Optionally, further includes:
If desired it updates, then obtains plug-in resource corresponding with the URL from Internet resources cross-domain services device.
It is optionally, described that loaded and displayed processing is carried out to the Internet resources and plug-in resource, comprising:
The Internet resources are loaded, and carries out rendering in a reservoir and shows;
The plug-in resource described in load and execution on the display page of the Internet resources.
Optionally, the plug-in resource includes at least one of following resources:
Pattern resource, picture resource, script resource.
It is optionally, described that cross-domain access request is sent to second domain server according to the URL, comprising:
It determines and locally whether is stored with cookie;
If cookie has been locally stored, the cookie is added in URL request, forms the URL for having cookie
Request;
Cross-domain access request is sent to second domain server, includes with cookie in the cross-domain access request
URL request.
Optionally, further includes:
If local not stored cookie, the cross-domain access request comprising the URL is sent to second domain server;
Correspondingly, the cross-domain access response for receiving second domain server and sending, in the cross-domain access response
Include Internet resources corresponding with the URL, comprising:
Receive the cross-domain access response that second domain server is sent, in the cross-domain access response comprising with it is described
The corresponding Internet resources of URL and cookie;
The cookie is stored in local.
Second aspect of the present invention provides a kind of cross-domain access process device, comprising:
Receiving module, the access request to the second domain resource sent on the first domain page for receiving user are described
It include the resource locator URL of second domain resource in access request;
Sending module, for sending cross-domain access request to second domain server according to the URL;
The receiving module is also used to receive the cross-domain access response that second domain server is sent, the cross-domain access
It include Internet resources corresponding with the URL in response;
Processing module, for obtaining plug-in resource corresponding with the Internet resources;
Display module, for carrying out loaded and displayed to the Internet resources and plug-in resource.
Optionally, the processing module is specifically used for:
Determine whether the plug-in resource corresponding with the Internet resources being locally stored needs to update;
If not needing to update, obtain described in the plug-in resource corresponding with the Internet resources that is locally stored.
Optionally, the processing module is also used to:
If desired it updates, then obtains plug-in resource corresponding with the URL from Internet resources cross-domain services device.
Optionally, the display module is specifically used for:
The Internet resources are loaded, and carries out rendering in a reservoir and shows;
The plug-in resource described in load and execution on the display page of the Internet resources.
Optionally, the plug-in resource includes at least one of following resources:
Pattern resource, picture resource, script resource.
Optionally, the processing module is also used to: determining locally whether be stored with cookie;
If cookie has been locally stored, the cookie is added in URL request, forms the URL for having cookie
Request;
The sending module is specifically used for sending cross-domain access request to second domain server, and the cross-domain access is asked
Include the URL request with cookie in asking.
Optionally, it if the sending module is also used to local not stored cookie, is sent to second domain server
Cross-domain access request comprising the URL;
Correspondingly, the receiving module is specifically used for:
Receive the cross-domain access response that second domain server is sent, in the cross-domain access response comprising with it is described
The corresponding Internet resources of URL and cookie;
The cookie is stored in local.
Third aspect present invention provides a kind of terminal device, comprising: transmitter, receiver, processor, memory, display
Device and computer program;In the memory, the processor executes the computer journey for the computer program storage
The cross-domain access processing method of the sequence realization any implementation of first aspect.
Fourth aspect present invention provides a kind of computer readable storage medium, and the computer-readable recording medium storage has
Computer program, terminal device execute the computer program and realize at cross-domain access described in any implementation of first aspect
Reason method.
Cross-domain access processing method and device provided in an embodiment of the present invention, terminal device are receiving user from the first domain
The access request to the second domain resource of the URL of the second domain of the carrying resource sent on the page, then according to the URL to the second domain
Server sends cross-domain access request, and receives the cross-domain access response of return, including Internet resources, is provided according to the network
Source obtains corresponding plug-in resource and carries out loaded and displayed, can directly insert to the second domain resource after completing the load of resource
Part resource and Internet resources are executed, and smooth upgrade is able to carry out in user's use process, reduce lower deployment cost, are improved and are used
Family experience.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is this hair
Bright some embodiments for those of ordinary skill in the art without any creative labor, can be with
Other attached drawings are obtained according to these attached drawings.
Fig. 1 is the flow chart of cross-domain access processing method embodiment one provided in an embodiment of the present invention;
Fig. 2 is the flow chart of cross-domain access processing method embodiment two provided in an embodiment of the present invention;
Fig. 3 is the flow chart of cross-domain access processing method embodiment three provided in an embodiment of the present invention;
Fig. 4 is cross-domain access process design architecture schematic diagram provided in an embodiment of the present invention;
Fig. 5 is the flow chart of cross-domain one example of access processing method provided in an embodiment of the present invention;
Fig. 6 is the structural schematic diagram of cross-domain access process Installation practice provided in an embodiment of the present invention;
Fig. 7 is the structural schematic diagram of terminal device embodiment provided in an embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
All other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
Cross-domain access refers to: cannot execute other domain name nets as caused by the origin policy of browser based on security reason
The javascript script stood, cross-domain access are exactly the javascript script not subject to this restriction for calling other domain name websites.
In currently existing scheme, the JS code that customization is executed on target Web site needs to carry out the cross-domain execution of JS.Browser is by inserting
Part load local JS code executes on target Web site, or by Nginx or similar product reverse proxy with the side of same area
Formula realizes cross-domain execution.However, there are following defects for the program:
1) local code, is loaded by browser plug-in, when JS code function updates and pin function upgrades, is needed
User carries out manual maintenance, increases lower deployment cost, reduces user experience.
2) cross-domain access, is carried out in a manner of same area Nginx or similar product reverse proxy, there are asking for centralization
Topic, reverse proxy service fault will lead to system and cannot integrally use.
3), reverse proxy concentrates a large amount of access to be forwarded, and is easily provided the Web site shielding of service, presence service is not
Available risk.
Based on above-mentioned problem, the present invention provides a kind of cross-domain access processing method, is inserted according to URL request server-side
Part related resource is simultaneously saved in local, is then loaded into resource and perform script.Below especially by several embodiments to the program
It is described in detail.
Fig. 1 is the flow chart of cross-domain access processing method embodiment one provided in an embodiment of the present invention, as shown in Figure 1, should
The main executing subject of scheme is the terminal device that mobile phone, computer etc. are mounted with browser, the cross-domain access processing method packet
It includes:
S101: the access request to the second domain resource that user sends on the first domain page is received, is wrapped in access request
URL containing the second domain resource.
In this step, user is when needing to go to access other domain page from a current domain page, according to user
Operation get an access request, can be in a kind of concrete implementation receive it is user's input or transmission to second
The access request of domain resource wherein at least includes the uniform resource locator (Uniform of the second domain resource of request
Resource Locator, URL).
S102: cross-domain access request is sent to the second domain server according to URL.
In the program, it should be understood that the second domain server refers to the corresponding server of the second domain resource, the first domain page
Corresponding first domain server.
After terminal device gets access request, corresponding second domain server is determined according to URL, and the access is asked
It asks and is sent to the second domain server, so that second domain server is handled and fed back to the access request.
S103: receiving the cross-domain access response that the second domain server is sent, and includes corresponding with URL in cross-domain access response
Internet resources.
In this step, after which receives access request, determine that obtaining the URL corresponds to according to URL
Internet resources, and return to terminal device.Specific terminal device receives the corresponding with the URL of the second domain server return
Internet resources, and the Internet resources are stored, to be loaded when the subsequent switching domain page.
S104: plug-in resource corresponding with Internet resources is obtained, and loaded and displayed is carried out to Internet resources and plug-in resource.
In this step, the access request to the second domain resource is being had sent by the first domain page, and get correspondence
Internet resources after, corresponding plug-in resource can be obtained according to the Internet resources, which includes Cookie resource.
It is corresponding, at least one of following resources of the plug-in resource: pattern resource, picture resource, script resource etc..
After the acquisition for completing above-mentioned plug-in resource, web resource can be loaded, then will locally be got
Plug-in resource be loaded into the second domain resource and shown, and perform script resource completes cross-domain access process.
Cross-domain access processing method provided in this embodiment, terminal device are sent receiving user from the first domain page
The second domain of carrying resource URL the access request to the second domain resource, then sent according to the URL to the second domain server
Cross-domain access request, and the cross-domain access response of return is received, including Internet resources, is obtained and corresponded to according to the Internet resources
Plug-in resource and carry out loaded and displayed, when complete resource load after can directly to the second domain resource plug-in resource and net
Network resource is executed, and smooth upgrade is able to carry out in user's use process, reduces lower deployment cost, improves user experience.
Fig. 2 is the flow chart of cross-domain access processing method embodiment two provided in an embodiment of the present invention, in above-described embodiment
On the basis of, the acquisition plug-in resource corresponding with Internet resources in the cross-domain access processing method process steps S104 can have
Body is embodied as following steps:
S1041: determine whether the plug-in resource corresponding with Internet resources being locally stored needs to update.
S1042: if not needing to update, the plug-in resource corresponding with Internet resources being locally stored is obtained.
S1043: if desired updating, then obtains plug-in resource corresponding with the URL from Internet resources cross-domain services device.
In above-mentioned steps, terminal device is after having got Internet resources, it is thus necessary to determine that the Internet resources are corresponding
Whether plug-in resource, which needs, updates, that is, whether newest the corresponding plug-in resource of the Internet resources being locally stored is, is
It is not to have issued new version, plug-in resource here is also referred to as plug-in resource.
If the plug-in resource being locally stored is latest edition, do not need to be updated the plug-in resource, Ke Yizhi
The plug-in resource corresponding with Internet resources for taking and being locally stored is obtained, loaded and displayed is then carried out.
If the plug-in resource being locally stored is not latest edition, need to the corresponding plug-in resource of the Internet resources into
Row updates, and the plug-in resource of new version is downloaded, local is then store in, is then executed to the plug-in resource.
In the above two embodiments, the program in the specific implementation, to carry out load to Internet resources and plug-in resource aobvious
Show processing, comprising: load the Internet resources, and carry out rendering in a reservoir and show;In the display page of the Internet resources
The plug-in resources such as upper load and execution pattern resource, picture resource, script resource.
Cross-domain access processing method provided in this embodiment, plug-in resource is more transparent to user, and edition upgrading is smooth, and
And lower deployment cost is low, and cross-domain access is realized by the way of end-to-end, can also reduce shielded risk.
Fig. 3 is the flow chart of cross-domain access processing method embodiment three provided in an embodiment of the present invention, in above-mentioned two reality
On the basis of applying example, cross-domain access request is sent to the second domain server according to the URL in step S102, it can be specific
It is embodied as following steps:
S1021: determine locally whether be stored with cookie.
S1022: if cookie has been locally stored, cookie being added in URL request, is formed with cookie
URL request.
In the above scheme, when the URL inputted by user accesses corresponding web resource, it is necessary first to determine this
Whether ground stores cookie in need, if so, the history cookie information can be then arranged among the request, i.e.,
Cookie is added in URL request, the URL request for having cookie is formed.
S1023: cross-domain access request is sent to the second domain server, includes with cookie in cross-domain access request
URL request.
Deposited it is found that being sent in the cross-domain access request of the second domain server and containing with local according to above-mentioned steps
The URL request of the cookie information of storage.
S1024: if local not stored cookie, the cross-domain access comprising URL request is sent to the second domain server and is asked
It asks.
If local and not stored cookie information, directly sent according to the URL that user inputs to the second domain server
Access request does not need to do other processing.
Correspondingly, receiving the cross-domain access response that second domain server is sent, include and institute in cross-domain access response
State the corresponding Internet resources of URL, comprising: receive the cross-domain access response that second domain server is sent, the cross-domain access
It include Internet resources corresponding with the URL and cookie in response;The cookie is stored in local.
On the basis of above-mentioned several embodiments, the program is illustrated below by a specific example.
Fig. 4 is cross-domain access process design architecture schematic diagram provided in an embodiment of the present invention, as shown in figure 4, cross-domain at this
Access processing method in the specific implementation, can be by one device for being exclusively used in executing the process of software design, i.e., in figure
The cross-domain executive device of web resource, including several main modulars once: cross-domain script executor, cross-domain resource manager (CDRM) device,
Cookie manager, web resource loader.In this scenario, when the cross-domain executive device of web resource accesses a Web site, lead to
Update mechanism is crossed to update perform script and relevant plug-in resource to local.When device completes the Internet resources of Web site
Load carries out the load of plug-in resource and the execution of script immediately, realizes cross-domain access end to end.When user uses
Smooth upgrade is carried out, improving user experience reduces lower deployment cost.
Wherein, web resource loader accesses corresponding web resource by the URL that user inputs, and carries out in a reservoir
Rendering display.
History cookie information is arranged among the corresponding request header in road when initiating request for Cookie manager, or
After receiving the feedback of domain server, obtained cookie information is subjected to local preservation when obtaining corresponding.
Cross-domain resource manager (CDRM) device, the cross-domain executive device of homepage accessing Web resources loaded according to web resource loader take
It is engaged in end (server), updates plug-in resource to locally, which includes pattern resource, picture resource, script resource etc..
Cross-domain script executor is responsible for the plug-in resource being locally stored being loaded into the page after completing web resource load
And execute associated script.
Fig. 5 is the flow chart of cross-domain one example of access processing method provided in an embodiment of the present invention, Web shown in Fig. 4
On the basis of the cross-domain executive device of resource, the specific implementation of the cross-domain access processing method includes are as follows:
User operates the first of terminal device with page uplink, initiates Web request, determines local whether there is
Cookie information directly sends Web request to obtain response data, wherein wrapping to the second domain server if being locally not present
Included cookie information and Internet resources, needed in the program according to response data cookie information therein is protected
It deposits.If locally existing in Web request plus after the cookie information, the second domain server is sent to obtain number of responses
According to including Internet resources.
After the above process, terminal device needs to verify whether the corresponding plug-in resource of the Internet resources is issued newly automatically
Version if otherwise needing to be updated plug-in resource without directly executing local plug-in resource, and new plug-in unit is provided
Source is stored, comprising: the updates such as plug-in pattern, plug-in picture, outer linked script are to locally.Terminal device executes local plug-in unit
Resource will all execute the script in local plug-in resource, performed script, in the mistake of update regardless of whether being updated successfully
Its integrality has been ensured in journey.
In cross-domain access processing method provided in this embodiment, plug-in resource is transparent to user, and edition upgrading is smooth, deployment
At low cost, decentralization avoids because central node failure causes system unavailable, and availability is higher, and use is square end to end
Formula realizes cross-domain accessing Web resources, reduces shielded risk.
Fig. 6 is the structural schematic diagram of cross-domain access process Installation practice provided in an embodiment of the present invention;As shown in fig. 6,
Cross-domain access process device 10 provided in this embodiment includes:
Receiving module 11, the access request to the second domain resource sent on the first domain page for receiving user, institute
State the resource locator URL in access request comprising second domain resource;
Sending module 12, for sending cross-domain access request to the second domain server according to the URL;
The receiving module 11 is also used to receive the cross-domain access response that second domain server is sent, the cross-domain visit
It asks in response comprising Internet resources corresponding with the URL;
Processing module 13, for obtaining plug-in resource corresponding with the Internet resources;
Display module 14, for carrying out loaded and displayed to the Internet resources and plug-in resource.
Cross-domain access process device provided in this embodiment, for realizing aforementioned any embodiment provide cross-domain access at
Reason method, it is similar that the realization principle and technical effect are similar, and smooth upgrade is able to carry out in user's use process, and reduction is deployed to
This, improves user experience.
On the basis of the above embodiments, the processing module 13 is specifically used for:
Determine whether the plug-in resource corresponding with the Internet resources being locally stored needs to update;
If not needing to update, obtain described in the plug-in resource corresponding with the Internet resources that is locally stored.
Optionally, the processing module 13 is also used to:
If desired it updates, then obtains plug-in resource corresponding with the URL from Internet resources cross-domain services device.
Optionally, the display module 14 is specifically used for:
The Internet resources are loaded, and carries out rendering in a reservoir and shows;
The plug-in resource described in load and execution on the display page of the Internet resources.
Optionally, the plug-in resource includes at least one of following resources:
Pattern resource, picture resource, script resource.
Optionally, the processing module 13 is also used to: determining locally whether be stored with cookie;
If cookie has been locally stored, the cookie is added in URL request, forms the URL for having cookie
Request;
The sending module 12 is specifically used for sending cross-domain access request, the cross-domain access to second domain server
Include the URL request with cookie in request.
Optionally, it if the sending module 12 is also used to local not stored cookie, is sent out to second domain server
Send the cross-domain access request comprising the URL;
Correspondingly, the receiving module 11 is specifically used for:
Receive the cross-domain access response that second domain server is sent, in the cross-domain access response comprising with it is described
The corresponding Internet resources of URL and cookie;
The cookie is stored in local.
The cross-domain access process device that any of the above-described embodiment provides provides cross-domain for realizing aforementioned any embodiment
Access processing method, it is similar that the realization principle and technical effect are similar,
Fig. 7 is the structural schematic diagram of terminal device embodiment provided in an embodiment of the present invention, as shown in fig. 7, the terminal is set
Standby includes: transmitter, receiver, processor, memory, display and computer program;The computer program is stored in
In the memory, the processor executes the computer program and realizes the cross-domain access process that aforementioned any embodiment provides
Method.
Optionally, memory can also be integrated in inside processor.
The application also provides a kind of computer readable storage medium, and the computer-readable recording medium storage has computer
Program, terminal device execute the computer program and realize the cross-domain access process side that aforementioned any embodiment provides
Method.
Above-mentioned terminal device in the specific implementation, it should be understood that processor can be central processing unit (English:
Central Processing Unit, referred to as: CPU), can also be other general processors, digital signal processor (English:
Digital Signal Processor, referred to as: DSP), specific integrated circuit (English: Application Specific
Integrated Circuit, referred to as: ASIC) etc..General processor can be microprocessor or the processor is also possible to
Any conventional processor etc..The step of method in conjunction with disclosed in the embodiment of the present invention, can be embodied directly in hardware processor
Execute completion, or in processor hardware and software module combination execute completion.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above-mentioned each method embodiment can lead to
The relevant hardware of program instruction is crossed to complete.Program above-mentioned can be stored in a computer readable storage medium.The journey
When being executed, execution includes the steps that above-mentioned each method embodiment to sequence;And storage medium above-mentioned includes: read-only memory (English
Text: read-only memory, abbreviation: ROM), RAM, flash memory, hard disk, solid state hard disk, tape (English: magnetic
Tape), floppy disk (English: floppy disk), CD (English: optical disc) and any combination thereof.
Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent
Pipe present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: its according to
So be possible to modify the technical solutions described in the foregoing embodiments, or to some or all of the technical features into
Row equivalent replacement;And these are modified or replaceed, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution
The range of scheme.
Claims (14)
1. a kind of cross-domain access processing method characterized by comprising
The access request to the second domain resource that user sends on the first domain page is received, includes described in the access request
The resource locator URL of second domain resource;
Cross-domain access request is sent to the second domain server according to the URL;
The cross-domain access response that second domain server is sent is received, includes and described URL pairs in the cross-domain access response
The Internet resources answered;
Plug-in resource corresponding with the Internet resources is obtained, and loaded and displayed is carried out to the Internet resources and plug-in resource.
2. the method according to claim 1, wherein described obtain plug-in unit money corresponding with the Internet resources
Source, comprising:
Determine whether the plug-in resource corresponding with the Internet resources being locally stored needs to update;
If not needing to update, obtain described in the plug-in resource corresponding with the Internet resources that is locally stored.
3. according to the method described in claim 2, it is characterized by further comprising:
If desired it updates, then obtains plug-in resource corresponding with the URL from Internet resources cross-domain services device.
4. method according to any one of claims 1 to 3, which is characterized in that described to be provided to the Internet resources and plug-in unit
Source carries out loaded and displayed processing, comprising:
The Internet resources are loaded, and carries out rendering in a reservoir and shows;
The plug-in resource described in load and execution on the display page of the Internet resources.
5. method according to any one of claims 1 to 3, which is characterized in that the plug-in resource includes in following resources
At least one:
Pattern resource, picture resource, script resource.
6. method according to any one of claims 1 to 3, which is characterized in that it is described according to the URL to second domain
Server sends cross-domain access request, comprising:
It determines and locally whether is stored with cookie;
If cookie has been locally stored, the cookie is added in URL request, forms the URL request for having cookie;
Cross-domain access request is sent to second domain server, includes the URL with cookie in the cross-domain access request
Request.
7. according to the method described in claim 6, it is characterized by further comprising:
If local not stored cookie, the cross-domain access request comprising the URL is sent to second domain server;
Correspondingly, the cross-domain access response for receiving second domain server and sending, include in the cross-domain access response
Internet resources corresponding with the URL, comprising:
The cross-domain access response that second domain server is sent is received, includes and described URL pairs in the cross-domain access response
The Internet resources and cookie answered;
The cookie is stored in local.
8. a kind of cross-domain access process device characterized by comprising
Receiving module, the access request to the second domain resource sent on the first domain page for receiving user, the access
It include the resource locator URL of second domain resource in request;
Sending module, for sending cross-domain access request to the second domain server according to the URL;
The receiving module is also used to receive the cross-domain access response that second domain server is sent, the cross-domain access response
In include Internet resources corresponding with the URL;
Processing module, for obtaining plug-in resource corresponding with the Internet resources;
Display module, for carrying out loaded and displayed to the Internet resources and plug-in resource.
9. device according to claim 8, which is characterized in that the processing module is specifically used for:
Determine whether the plug-in resource corresponding with the Internet resources being locally stored needs to update;
If not needing to update, obtain described in the plug-in resource corresponding with the Internet resources that is locally stored.
10. device according to claim 9, which is characterized in that the processing module is also used to:
If desired it updates, then obtains plug-in resource corresponding with the URL from Internet resources cross-domain services device.
11. according to the described in any item devices of claim 8 to 10, which is characterized in that the display module is specifically used for:
The Internet resources are loaded, and carries out rendering in a reservoir and shows;
The plug-in resource described in load and execution on the display page of the Internet resources.
12. according to the described in any item devices of claim 8 to 10, which is characterized in that the plug-in resource includes following resources
At least one of:
Pattern resource, picture resource, script resource.
13. according to the described in any item devices of claim 8 to 10, which is characterized in that the processing module is also used to: determining this
Whether ground is stored with cookie;
If cookie has been locally stored, the cookie is added in URL request, forms the URL request for having cookie;
The sending module is specifically used for sending cross-domain access request to second domain server, in the cross-domain access request
URL request comprising having cookie.
14. device according to claim 13, which is characterized in that if the sending module be also used to it is local not stored
Cookie then sends the cross-domain access request comprising the URL to second domain server;
Correspondingly, the receiving module is specifically used for:
The cross-domain access response that second domain server is sent is received, includes and described URL pairs in the cross-domain access response
The Internet resources and cookie answered;
The cookie is stored in local.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810543057.4A CN108964975B (en) | 2018-05-30 | 2018-05-30 | Cross-domain access processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810543057.4A CN108964975B (en) | 2018-05-30 | 2018-05-30 | Cross-domain access processing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108964975A true CN108964975A (en) | 2018-12-07 |
CN108964975B CN108964975B (en) | 2021-07-20 |
Family
ID=64492268
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810543057.4A Active CN108964975B (en) | 2018-05-30 | 2018-05-30 | Cross-domain access processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108964975B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110245156A (en) * | 2019-05-29 | 2019-09-17 | 吉旗(成都)科技有限公司 | Caching data processing method and device |
CN110769060A (en) * | 2019-10-28 | 2020-02-07 | 中南大学 | Web page loading speed optimization method based on cross-domain object dependency relationship |
CN111435380A (en) * | 2019-01-14 | 2020-07-21 | 顺丰科技有限公司 | Page cross-domain interaction method, system, device and storage device |
CN111698295A (en) * | 2020-05-26 | 2020-09-22 | 深信服科技股份有限公司 | Communication method, device, equipment and computer storage medium |
CN113783972A (en) * | 2021-07-26 | 2021-12-10 | 福建野小兽健康科技有限公司 | Server domain name switching method and device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104410711A (en) * | 2014-12-15 | 2015-03-11 | 北京国双科技有限公司 | Cross-domain network resource request method and device for client |
CN105302564A (en) * | 2015-11-09 | 2016-02-03 | 中国人民解放军91655部队 | Online office software service control and implementation method |
CN105653933A (en) * | 2016-01-06 | 2016-06-08 | 北京京东尚科信息技术有限公司 | Plugin loading method and device |
CN108073435A (en) * | 2016-11-18 | 2018-05-25 | 中国电子科技集团公司第十五研究所 | A kind of multi information integrative display method and system |
-
2018
- 2018-05-30 CN CN201810543057.4A patent/CN108964975B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104410711A (en) * | 2014-12-15 | 2015-03-11 | 北京国双科技有限公司 | Cross-domain network resource request method and device for client |
CN105302564A (en) * | 2015-11-09 | 2016-02-03 | 中国人民解放军91655部队 | Online office software service control and implementation method |
CN105653933A (en) * | 2016-01-06 | 2016-06-08 | 北京京东尚科信息技术有限公司 | Plugin loading method and device |
CN108073435A (en) * | 2016-11-18 | 2018-05-25 | 中国电子科技集团公司第十五研究所 | A kind of multi information integrative display method and system |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111435380A (en) * | 2019-01-14 | 2020-07-21 | 顺丰科技有限公司 | Page cross-domain interaction method, system, device and storage device |
CN111435380B (en) * | 2019-01-14 | 2024-04-16 | 顺丰科技有限公司 | Page cross-domain interaction method, system, device and storage device |
CN110245156A (en) * | 2019-05-29 | 2019-09-17 | 吉旗(成都)科技有限公司 | Caching data processing method and device |
CN110769060A (en) * | 2019-10-28 | 2020-02-07 | 中南大学 | Web page loading speed optimization method based on cross-domain object dependency relationship |
CN110769060B (en) * | 2019-10-28 | 2020-07-31 | 中南大学 | Web page loading speed optimization method based on cross-domain object dependency relationship |
CN111698295A (en) * | 2020-05-26 | 2020-09-22 | 深信服科技股份有限公司 | Communication method, device, equipment and computer storage medium |
CN111698295B (en) * | 2020-05-26 | 2023-05-12 | 深信服科技股份有限公司 | Communication method, device, equipment and computer storage medium |
CN113783972A (en) * | 2021-07-26 | 2021-12-10 | 福建野小兽健康科技有限公司 | Server domain name switching method and device |
Also Published As
Publication number | Publication date |
---|---|
CN108964975B (en) | 2021-07-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108964975A (en) | Cross-domain access processing method and device | |
CN104468817B (en) | Implementation method and device, server, the client of resource is downloaded by CDN | |
CN106528432B (en) | The construction method and device of test scene data bury a test method | |
JP6164440B2 (en) | Application upgrade method and apparatus | |
US9083566B1 (en) | System and method for communicating with an applet using an inline web frame in a network environment | |
WO2019205203A1 (en) | Webpage loading method, server, and webpage loading system | |
CN103973682B (en) | Carry out the method and device of web page access | |
CN108228282A (en) | For the method and device of Website page loading | |
CN108132814A (en) | Page loading method, device, computer equipment and the storage medium of application program | |
CN103475744A (en) | Resource downloading method, device and system on basis of Web application | |
CN112748962B (en) | Application loading method, device, electronic equipment and computer readable medium | |
CN111198998A (en) | Network page loading method, device and system based on Ajax request | |
CN108280174A (en) | Front end file construction method and server, page access method and terminal | |
CN104978378B (en) | A kind of Web access method and device | |
EP2256633A2 (en) | Service provider management device, service provider management program, and service provider management method | |
CN109800370A (en) | Display methods, device, computer equipment and the storage medium of Webpage | |
CN113641582A (en) | Mixed-mode mobile application debugging method and system | |
CN113778543B (en) | Page content updating method and device applied to plug-in | |
US20160103666A1 (en) | Performance improvement method in instance hosting environment and service system therefor | |
CN108228359B (en) | Method and system for integrating web program and R program to process data | |
CN106202104A (en) | The correlation technique of the opening speed of the optimization aim page and device | |
CN113220296A (en) | Android system interaction method and device | |
CN105229990B (en) | The method and apparatus for loading webpage | |
CN103733596A (en) | Method for managing access to a set of resources delivered via an electronic device | |
CN106648870A (en) | Service restarting method and device |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |