CN102314469A - Method for implementing cross-domain request callback - Google Patents
Method for implementing cross-domain request callback Download PDFInfo
- Publication number
- CN102314469A CN102314469A CN2011100599669A CN201110059966A CN102314469A CN 102314469 A CN102314469 A CN 102314469A CN 2011100599669 A CN2011100599669 A CN 2011100599669A CN 201110059966 A CN201110059966 A CN 201110059966A CN 102314469 A CN102314469 A CN 102314469A
- Authority
- CN
- China
- Prior art keywords
- webpage
- station
- readjustment
- page
- processing
- 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
Links
Images
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The invention belongs to the technical field of communications, and specifically relates to a method for implementing cross-domain request callback. The method comprises the following steps that: a source user opens a local site webpage, the local site webpage loads a non-local site webpage through a webpage frame, automatically generates the webpage frame and loads a callback processing page of the local site in the loaded non-local site webpage; when the non-local site webpage executes treatments and needs to change the content of the local site webpage, embedded frame link addresses and parameters are changed so as to notify the embedded callback processing page of the local site webpage with the content to be processed, after receiving a processing instruction, the embedded callback processing page of the local site webpage calls a parent webpage processing function of own parent to operate the local site webpage, thereby implementing the cross-domain request callback on the webpage. The method is implemented completely based on the webpage, specifically, implemented by embedding via own frame components of the webpage, needs no support of a third party application system for processing, and is convenient, quick and efficient.
Description
Technical field
The invention belongs to networking technology area, be specifically related to realize on a kind of webpage the method for cross-domain request readjustment.
Background technology
Along with Internet development, electronic information has obtained well popularizing, and basic routine work has also realized automation mechanized operation.As a rule; One independently system often can't satisfy all business demands, thus since, introduce a plurality of systems with regard to needs and operate; After introducing a plurality of systems; The user management of enterprise, organizational structure's management etc. will exist many problems and inconvenience, such as the user in the A system registry, can not login the B system.As long as relate to the system of this kind demand, all there is above problem.
Certainly, solution has at present, such as single-node login system, enterprise application integration system, LDAP system etc.; But; These technological realizations are very complicated, and can the implementation structure and the data structure of existing product heavily be changed, and could satisfy integrated demand.This technical difficulty is very big, and is difficult to maturation at short notice, will inevitably bring a lot of leaks and hidden danger to business system like this.
Simple method also has; Such as handle through the webpage agent way, post request, get request etc.; These methods all are to realize through remedying mode; Need import quantity of parameters in the process into and need resolve these parameters, put into certain buffer zone (like database, hard disk or internal memory etc.) after the parsing again, former webpage need regularly read this and resolve to reach the purpose of renewal; Waste very much server and client side's resource, do not accomplishing cross-domain request readjustment on the meaning fully.
Summary of the invention
The invention provides a kind of method that realizes cross-domain request readjustment, realized need not downloading the support of any control and third party's application framework and application system and easy to operate.
In order to achieve the above object, technical scheme of the present invention is:
Realize the method for cross-domain request readjustment on a kind of webpage, may further comprise the steps:
1) source user is opened the our station webpage, and the our station webpage loads outer station webpage through web page frame;
2) the outer station webpage that is loaded generates web page frame automatically, and on framework, loads the readjustment processing page of our station;
3) handle when need changing the our station web page contents when outer station webpage, inform that through changing embedded framework chained address and parameter embedded our station webpage adjusts back processing page and need carry out processed content;
4) our station webpage readjustment processing page is after receiving processing instruction, and the parent webpage that calls own parent is the processing function of the former webpage of our station, and the our station webpage is operated, and promptly realizes cross-domain request readjustment on the webpage.
In the technique scheme, step 1) comprises following process:
Source user is opened the our station webpage, and the our station webpage loads outer station webpage through webpage iframe assembly.
In the technique scheme, step 2) comprise following process:
2a) load after outer station webpage loads successfully,, and the iframe method of being created is added in the webpage through document.appendChi ld method through document.createElement method establishment iframe assembly;
After 2b) iframe adds the page to,, the iframe content is pointed to the readjustment processing page of the same domain name of our station, and in the src parameter, transmit the former webpage readjustment of our station and handle function name through the src attribute of change iframe.
In the technique scheme, step 3) comprises following process:
Webpage carries out business processing when outer station; In the time of need changing the our station web page contents; Invoking web page JavaScript function, change embed the src attribute of the iframe assembly of the our station readjustment page, and the former webpage readjustment of our station that transmission needs to handle in the src parameter is handled function name.
In the technique scheme, step 4) comprises following process:
Our station webpage readjustment processing page is when loading; Can detect the call back function name that the URL parameter is passed over automatically; Parent window function through calling parent window is carried out JavaScript; Because the parent window of parent window is to belong to same territory with this page,, promptly realize cross-domain request readjustment on the webpage so there is authority that the our station webpage is operated.
The present invention compared with prior art has the following advantages:
1) utilizes webpage self assembly to realize, need not download any control, do not need the third party to use and support.
2) through chain callback mechanism, be swift in response, user experience is good.
3) realize that principle is simple, fully based on webpage, need not download any plug-in unit, green, environmental protection can be widely used in the internet, applications such as Web conference, long-distance education.
Description of drawings
Accompanying drawing described herein is used to provide further understanding of the present invention, constitutes the application's a part, and illustrative examples of the present invention and explanation thereof are used to explain the present invention, do not constitute improper qualification of the present invention.In the accompanying drawings:
Fig. 1 is a detail flowchart of the present invention.
Embodiment
Below will and combine embodiment to specify the present invention with reference to accompanying drawing.Need to prove that under the situation of not conflicting, embodiment and the characteristic among the embodiment among the application can make up each other.
Realize the method for cross-domain request readjustment on a kind of webpage, may further comprise the steps:
1) source user is opened the our station webpage, and the our station webpage loads outer station webpage through web page frame;
2) the outer station webpage that is loaded generates web page frame automatically, and on framework, loads the readjustment processing page of our station;
3) handle when need changing the our station web page contents when outer station webpage, inform that through changing embedded framework chained address and parameter embedded our station webpage adjusts back processing page and need carry out processed content;
4) our station webpage readjustment processing page is after receiving processing instruction, and the parent webpage that calls own parent is the processing function of the former webpage of our station, and the our station webpage is operated, and promptly realizes cross-domain request readjustment on the webpage.
Following further explain method of the present invention:
Referring to Figure of description, source user is opened the our station webpage, and the our station webpage loads outer station webpage through webpage iframe assembly; After the outer station webpage that loads loads successfully, create the iframe assembly through the document.createElement method, and the iframe method of being created is added in the webpage through the document.appendChild method; After iframe adds the page to,, the iframe content is pointed to the readjustment processing page of our station, and in the src parameter, transmit the former webpage readjustment of our station and handle function name through the src attribute of change iframe; Webpage carries out business processing when outer station; In the time of need changing the our station web page contents; Invoking web page JavaScript function, change embed the src attribute of the iframe assembly of the our station readjustment page, and the former webpage readjustment of our station that transmission needs to handle in the src parameter is handled function name; Our station webpage readjustment processing page is when loading; Can detect the call back function name that the URL parameter is passed over automatically; Parent window function through calling parent window is carried out JavaScript; Because the readjustment processing page belongs to same territory with this page,, promptly realize cross-domain request readjustment on the webpage so the our station webpage is operated with authority.
Fig. 1 is a detail flowchart of the present invention, and detailed step is following:
Step 101: beginning;
Step 102: source user is opened the our station webpage, and the our station webpage loads outer station webpage through web page frame;
Step 103: the webpage of standing outward loads our station readjustment processing page through web page frame;
Step 104: the web-page change our station of standing outward readjustment processing page address is also imported corresponding processing parameter into;
Step 105: the readjustment processing page receives parameter and handles, and calls the processing function of the our station webpage of the parent of adjusting back the processing page parent our station webpage is operated the our station web page contents, promptly realizes cross-domain request readjustment on the webpage;
Step 106: finish.
Obviously, it is apparent to those skilled in the art that above-mentioned each module of the present invention or each step can realize with the general calculation device; They can concentrate on the single calculation element; Perhaps be distributed on the network that a plurality of calculation element forms, alternatively, they can be realized with the executable program code of calculation element; Thereby; Can they be stored in the memory storage and carry out, and in some cases, can carry out step shown or that describe with the order that is different from here by calculation element; Perhaps they are made into each integrated circuit modules respectively, perhaps a plurality of modules in them or step are made into the single integrated circuit module and realize.Like this, the present invention is not restricted to any specific hardware and software combination.
The above is merely the preferred embodiments of the present invention, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.All within spirit of the present invention and principle, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.
Claims (10)
1. a method that realizes cross-domain request readjustment is characterized in that, may further comprise the steps:
1) source user is opened the our station webpage, and the our station webpage loads outer station webpage through web page frame;
2) the outer station webpage that is loaded generates web page frame automatically, and on framework, loads the readjustment processing page of our station;
3) handle when need changing the our station web page contents when outer station webpage, inform that through changing embedded framework chained address and parameter embedded our station webpage adjusts back processing page and need carry out processed content;
4) our station webpage readjustment processing page is after receiving processing instruction, and the parent webpage that calls own parent is the processing function of the former webpage of our station, and the our station webpage is operated, and promptly realizes cross-domain request readjustment on the webpage.
2. the method for claim 1 is characterized in that, wherein step 1) comprises following process:
Source user is opened the our station webpage, and the our station webpage loads outer station webpage through webpage iframe assembly.
3. the method for claim 1 is characterized in that, wherein step 2) comprise following process:
2a) load after outer station webpage loads successfully,, and the iframe method of being created is added in the webpage through the document.appendChild method through document.createElement method establishment iframe assembly;
After 2b) iframe adds the page to,, the iframe content is pointed to the readjustment processing page of the same domain name of our station, and in the src parameter, transmit the former webpage readjustment of our station and handle function name through the src attribute of change iframe.
4. the method for claim 1 is characterized in that, wherein step 3) comprises following process:
Webpage carries out business processing when outer station; In the time of need changing the our station web page contents; Invoking web page JavaScript function, change embed the src attribute of the iframe assembly of the our station readjustment page, and the former webpage readjustment of our station that transmission needs to handle in the src parameter is handled function name.
5. the method for claim 1 is characterized in that, wherein step 4) comprises following process:
Our station webpage readjustment processing page is when loading; Can detect the call back function name that the URL parameter is passed over automatically; Parent window function through calling parent window is carried out JavaScript; Because the parent window of parent window is to belong to same territory with this page,, promptly realize cross-domain request readjustment on the webpage so there is authority that the our station webpage is operated.
6. a method that realizes crossing over the request readjustment is characterized in that: the readjustment processing page that loads our station in the our station webpage outside source user loads on the station webpage and the webpage of outside said, standing; The station webpage is handled when needing to change said our station web page contents outside said, notifies embedded our station webpage readjustment processing page; The parent webpage that said our station webpage readjustment processing page is called own parent is the processing function of the former webpage of our station, and said our station webpage is operated, and realizes cross-domain request readjustment on the webpage.
7. method according to claim 6 is characterized in that: said source user is opened said our station webpage, and said our station webpage loads said outer station webpage through web page frame; The said outer station webpage that is loaded generates web page frame automatically, and on framework, loads the readjustment processing page of our station.
8. method according to claim 7; It is characterized in that: when the station webpage is handled needs and changed the our station web page contents outside said, inform that through changing embedded framework chained address and parameter embedded our station webpage adjusts back processing page and need carry out processed content.
9. method according to claim 8; It is characterized in that: said our station webpage readjustment processing page is after receiving processing instruction; The parent webpage that calls own parent is the processing function of the former webpage of our station, and said our station webpage is operated, and realizes cross-domain request readjustment on the webpage.
10. method according to claim 7; It is characterized in that: said source user is opened said our station webpage; Said our station webpage through the process that web page frame loads said outer station webpage is: said source user is opened said our station webpage, and said our station webpage loads said outer station webpage through webpage iframe assembly; The said outer station webpage that is loaded generates web page frame automatically; And on framework, load our station the readjustment processing page process by: after the webpage of standing outside being loaded loads successfully; Create the iframe assembly through the document.createElement method, and the iframe method of being created is added in the webpage through the document.appendChild method; After iframe adds the page to,, the iframe content is pointed to the readjustment processing page of the same domain name of our station, and in the src parameter, transmit the former webpage readjustment of our station and handle function name through the src attribute of change iframe.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011100599669A CN102314469A (en) | 2010-11-23 | 2011-03-14 | Method for implementing cross-domain request callback |
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010554790.X | 2010-11-23 | ||
CN201010554790XA CN102043832A (en) | 2010-11-23 | 2010-11-23 | Method for realizing cross-domain request callback on webpage |
CN2011100599669A CN102314469A (en) | 2010-11-23 | 2011-03-14 | Method for implementing cross-domain request callback |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102314469A true CN102314469A (en) | 2012-01-11 |
Family
ID=43909970
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201010554790XA Pending CN102043832A (en) | 2010-11-23 | 2010-11-23 | Method for realizing cross-domain request callback on webpage |
CN2011100599669A Pending CN102314469A (en) | 2010-11-23 | 2011-03-14 | Method for implementing cross-domain request callback |
Family Applications Before (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201010554790XA Pending CN102043832A (en) | 2010-11-23 | 2010-11-23 | Method for realizing cross-domain request callback on webpage |
Country Status (1)
Country | Link |
---|---|
CN (2) | CN102043832A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104423973A (en) * | 2013-08-20 | 2015-03-18 | 腾讯科技(深圳)有限公司 | Iframe page loading information processing method, Iframe page loading information processing device and Iframe page loading information processing system |
CN104714980A (en) * | 2013-12-17 | 2015-06-17 | 阿里巴巴集团控股有限公司 | Page nesting path determination method and device |
CN105306341A (en) * | 2012-10-19 | 2016-02-03 | 北京奇虎科技有限公司 | Message sending device and receiving device and method and system in browser |
CN111954015A (en) * | 2020-08-13 | 2020-11-17 | 南京百家云科技有限公司 | Method and device for realizing online live broadcast classroom |
Families Citing this family (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102446224B (en) * | 2012-01-05 | 2013-06-05 | 苏州阔地网络科技有限公司 | Multi-level webpage block clipping method |
CN103246667A (en) * | 2012-02-08 | 2013-08-14 | 腾讯科技(深圳)有限公司 | Method and device for cross-domain transfer of data |
CN103309861B (en) * | 2012-03-07 | 2018-04-10 | 阿里巴巴集团控股有限公司 | The method and apparatus that cross-domain data obtains |
CN103377059B (en) * | 2012-04-23 | 2016-09-28 | 阿里巴巴集团控股有限公司 | Functional module dynamic loading method based on jQuery framework and device |
CN103856493B (en) * | 2012-11-28 | 2019-02-12 | 北京京东尚科信息技术有限公司 | Cross-domain login system and method |
CN103905477B (en) * | 2012-12-25 | 2018-04-27 | 阿里巴巴集团控股有限公司 | A kind of method and server for handling HTTP request |
CN104965690B (en) * | 2014-04-18 | 2018-07-06 | 腾讯科技(深圳)有限公司 | Data processing method and device |
CN104021003A (en) * | 2014-06-24 | 2014-09-03 | 歌尔声学股份有限公司 | Method and device for modifying home page of information management system |
CN104301379A (en) * | 2014-08-28 | 2015-01-21 | 北京奇虎科技有限公司 | Web page cross-domain communication method and device |
CN107203521B (en) * | 2016-03-16 | 2020-09-04 | 阿里巴巴集团控股有限公司 | Information processing method and device |
CN108073627B (en) * | 2016-11-16 | 2021-12-28 | 深圳联友科技有限公司 | JavaScript function calling method and device for cross-domain webpage |
CN108509229B (en) * | 2017-12-26 | 2021-05-04 | 平安普惠企业管理有限公司 | Window cross-domain control method, terminal equipment and computer readable storage medium |
CN108228181A (en) * | 2017-12-29 | 2018-06-29 | 北京奇虎科技有限公司 | The method and device of embedded html page in html page |
CN111026659B (en) * | 2019-12-05 | 2023-04-21 | 南开大学 | Mobile application callback analysis research method based on embedded representation |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070299857A1 (en) * | 2006-06-23 | 2007-12-27 | Microsoft Corporation | Cross Domain Communication |
CN101610194A (en) * | 2008-06-17 | 2009-12-23 | 上海格尔软件股份有限公司 | The method of AJAX cross-domain asynchronous transmission of high volume data |
CN101615179A (en) * | 2008-06-25 | 2009-12-30 | 国际商业机器公司 | The method and system that is used for the cross-domain alternation of Web application |
CN101772780A (en) * | 2007-05-28 | 2010-07-07 | 谷歌公司 | Inter-domain communication |
-
2010
- 2010-11-23 CN CN201010554790XA patent/CN102043832A/en active Pending
-
2011
- 2011-03-14 CN CN2011100599669A patent/CN102314469A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070299857A1 (en) * | 2006-06-23 | 2007-12-27 | Microsoft Corporation | Cross Domain Communication |
CN101772780A (en) * | 2007-05-28 | 2010-07-07 | 谷歌公司 | Inter-domain communication |
CN101610194A (en) * | 2008-06-17 | 2009-12-23 | 上海格尔软件股份有限公司 | The method of AJAX cross-domain asynchronous transmission of high volume data |
CN101615179A (en) * | 2008-06-25 | 2009-12-30 | 国际商业机器公司 | The method and system that is used for the cross-domain alternation of Web application |
Non-Patent Citations (2)
Title |
---|
徐瑾等: "用iframe与ASP实现建材电子商务系统", 《江西建材》 * |
陈冈: "构造基于Iframe的ASP数据处理方式", 《现代计算机》 * |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105306341A (en) * | 2012-10-19 | 2016-02-03 | 北京奇虎科技有限公司 | Message sending device and receiving device and method and system in browser |
CN105306341B (en) * | 2012-10-19 | 2019-05-28 | 北京奇虎科技有限公司 | Message sending device and receiving device and method and system in browser |
CN104423973A (en) * | 2013-08-20 | 2015-03-18 | 腾讯科技(深圳)有限公司 | Iframe page loading information processing method, Iframe page loading information processing device and Iframe page loading information processing system |
CN104423973B (en) * | 2013-08-20 | 2020-02-18 | 腾讯科技(深圳)有限公司 | Processing method, device and system for floating frame page loading information |
CN104714980A (en) * | 2013-12-17 | 2015-06-17 | 阿里巴巴集团控股有限公司 | Page nesting path determination method and device |
CN104714980B (en) * | 2013-12-17 | 2018-04-06 | 阿里巴巴集团控股有限公司 | Page nesting determining method of path and device |
CN111954015A (en) * | 2020-08-13 | 2020-11-17 | 南京百家云科技有限公司 | Method and device for realizing online live broadcast classroom |
CN111954015B (en) * | 2020-08-13 | 2021-07-20 | 南京百家云科技有限公司 | Method and device for realizing online live broadcast classroom |
Also Published As
Publication number | Publication date |
---|---|
CN102043832A (en) | 2011-05-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102314469A (en) | Method for implementing cross-domain request callback | |
US9864671B1 (en) | Systems and methods of live experimentation on content provided by a web site | |
US9277030B2 (en) | Stream processing using a client-server architecture | |
AU2009262065B2 (en) | Embedding macros in web pages with advertisements | |
US8527862B2 (en) | Methods for making ajax web applications bookmarkable and crawlable and devices thereof | |
US20120239753A1 (en) | Systems and methods for collaboration shared state management | |
US20060031497A1 (en) | Systems and methods for collaborative content storage | |
US7881304B2 (en) | Using distributed aspects to reorder online application workflows | |
US10958735B2 (en) | Client connection method and system | |
US20050262185A1 (en) | Systems and methods for a collaboration messaging framework | |
US20050262094A1 (en) | Systems and methods for enterprise collaboration | |
US20050278294A1 (en) | Systems and methods for a collaboration presence framework | |
US20060004690A1 (en) | Systems and methods for dynamic configuration of a collaboration | |
US20050262095A1 (en) | Systems and methods for collaboration interceptors | |
CN102427480A (en) | Application access method in a plurality of application service platform systems | |
US20050262092A1 (en) | Systems and methods for collaboration dynamic pageflows | |
CN109829121B (en) | Method and device for reporting click behavior data | |
WO2005114383A2 (en) | Systems and methods for enterprise collaboration | |
US20050262007A1 (en) | Systems and methods for a collaborative call center | |
US11811884B1 (en) | Topic subscription provisioning for communication protocol | |
US9871848B1 (en) | Integration engine for communications between source and target applications | |
US9742835B2 (en) | System and method for backend control of frontend user interfaces | |
CN110505074B (en) | Application modularization integration method and device | |
CN104301311A (en) | Method and device for filtering network data content through DNS | |
US20120143866A1 (en) | Client Performance Optimization by Delay-Loading Application Files with Cache |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20120111 |