CN102043832A - Method for realizing cross-domain request callback on webpage - Google Patents

Method for realizing cross-domain request callback on webpage Download PDF

Info

Publication number
CN102043832A
CN102043832A CN201010554790XA CN201010554790A CN102043832A CN 102043832 A CN102043832 A CN 102043832A CN 201010554790X A CN201010554790X A CN 201010554790XA CN 201010554790 A CN201010554790 A CN 201010554790A CN 102043832 A CN102043832 A CN 102043832A
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
Application number
CN201010554790XA
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.)
Suzhou Codyy Network Technology Co Ltd
Original Assignee
Suzhou Codyy Network 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 Suzhou Codyy Network Technology Co Ltd filed Critical Suzhou Codyy Network Technology Co Ltd
Priority to CN201010554790XA priority Critical patent/CN102043832A/en
Priority to CN2011100599669A priority patent/CN102314469A/en
Publication of CN102043832A publication Critical patent/CN102043832A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a method for realizing cross-domain request callback on a webpage, which belongs to the technical field of networks. The method comprises the following steps: opening a home-station webpage by a source user, and loading an external-station webpage on the home-station webpage through a webpage frame; automatically generating the webpage frame and loading a home-station callback processing page in the loaded external-station webpage; when the processing on the external-station webpage needs to change the contents of the home-station webpage, informing the callback processing page embedded into the home-station webpage of the contents required to be processed through changing the link address and parameters of the embedded frame; and after the callback processing page embedded into the home-station webpage receives a processing instruction, invoking a parent webpage processing function of the callback processing page to operate the home-station webpage, thereby realizing the cross-domain request callback on the webpage. The method is realized completely based on the webpage, and is implemented through the nestification of the frame components of the webpage without the support processing of an application system of a third party, therefore, the method is convenient, fast and efficient.

Description

Realize the method for cross-domain request readjustment on a kind of webpage
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, introducing a plurality of systems with regard to needs operates, 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, the realization of these technology is 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 by the webpage agent way, post request, get request etc., these methods all are to realize by remedying mode, need to import into quantity of parameters in the process and need resolve these parameters, put into certain buffer zone (as 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.
Realize the method for cross-domain request readjustment on a kind of webpage, be intended to solve the problem that exists in the processing of the cross-domain request readjustment of the webpage of realizing under the present traditional approach, need not to download any control, need not third party's application framework and application system supports, realize based on the control of webpage own fully, easy to operate, speed is fast, reaction is timely, is a kind of popular technology of truly can popularizing.And realize that principle is very simple, can embed easily in the various internet, applications.
Summary of the invention
The objective of the invention is: the method that realizes cross-domain request readjustment on a kind of webpage is provided.
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 by web page frame;
2) the outer station webpage that is loaded generates web page frame automatically, and loads the readjustment processing page of our station on framework;
3) when outer station webpage is handled needs change our station web page contents, by changing the content that embedded framework chained address and parameter inform that embedded our station webpage readjustment processing page need be handled;
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 by 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 by the document.appendChild method by 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 by 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 transmit the former webpage readjustment of our station that needs to handle and handle function name in the src parameter.
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, carry out JavaScript by the parent window function that calls parent window, because parent window and this page of parent window are to belong to same territory, so have authority that the our station webpage is operated, promptly realize cross-domain request readjustment on the webpage.
The present invention compared with prior art has the following advantages:
1) utilizes webpage self assembly to realize, do not need to download any control, do not need the third party to use and support.
2) by chain callback mechanism, be swift in response, user experience is good.
3) realize that principle is simple, fully based on webpage, do not need to 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
Figure of description is a detail flowchart of the present invention.
Embodiment
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 by web page frame;
2) the outer station webpage that is loaded generates web page frame automatically, and loads the readjustment processing page of our station on framework;
3) when outer station webpage is handled needs change our station web page contents, by changing the content that embedded framework chained address and parameter inform that embedded our station webpage readjustment processing page need be handled;
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.
Further describe method of the present invention below:
Referring to Figure of description, source user is opened the our station webpage, and the our station webpage loads outer station webpage by webpage iframe assembly; After the outer station webpage that loads loads successfully, create the iframe assembly by the document.createElement method, and the iframe method of being created is added in the webpage by 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 by 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 transmit the former webpage readjustment of our station that needs to handle and handle function name in the src parameter; Our station webpage readjustment processing page is when loading, can detect the call back function name that the URL parameter is passed over automatically, carry out JavaScript by the parent window function that calls parent window, because readjustment processing page and this page belong to same territory, so with authority the our station webpage is operated, is promptly realized cross-domain request readjustment on the webpage.

Claims (5)

1. realize the method that cross-domain request is adjusted back on a webpage, it 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 by web page frame;
2) the outer station webpage that is loaded generates web page frame automatically, and loads the readjustment processing page of our station on framework;
3) when outer station webpage is handled needs change our station web page contents, by changing the content that embedded framework chained address and parameter inform that embedded our station webpage readjustment processing page need be handled;
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. realize the method for cross-domain request readjustment on a kind of webpage as claimed in claim 1, it 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 by webpage iframe assembly.
3. realize the method for cross-domain request readjustment on a kind of webpage as claimed in claim 1, it 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 by the document.appendChild method by 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 by the src attribute of change iframe.
4. realize the method for cross-domain request readjustment on a kind of webpage as claimed in claim 1, it 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 transmit the former webpage readjustment of our station that needs to handle and handle function name in the src parameter.
5. realize the method for cross-domain request readjustment on a kind of webpage as claimed in claim 1, it 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, carry out JavaScript by the parent window function that calls parent window, because parent window and this page of parent window are to belong to same territory, so have authority that the our station webpage is operated, promptly realize cross-domain request readjustment on the webpage.
CN201010554790XA 2010-11-23 2010-11-23 Method for realizing cross-domain request callback on webpage Pending CN102043832A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
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

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010554790XA CN102043832A (en) 2010-11-23 2010-11-23 Method for realizing cross-domain request callback on webpage

Publications (1)

Publication Number Publication Date
CN102043832A true CN102043832A (en) 2011-05-04

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 After (1)

Application Number Title Priority Date Filing Date
CN2011100599669A Pending CN102314469A (en) 2010-11-23 2011-03-14 Method for implementing cross-domain request callback

Country Status (1)

Country Link
CN (2) CN102043832A (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102446224A (en) * 2012-01-05 2012-05-09 苏州阔地网络科技有限公司 Multi-level webpage block clipping method
CN103246667A (en) * 2012-02-08 2013-08-14 腾讯科技(深圳)有限公司 Method and device for cross-domain transfer of data
CN103309861A (en) * 2012-03-07 2013-09-18 阿里巴巴集团控股有限公司 Method and device for acquiring cross-domain data
CN103377059A (en) * 2012-04-23 2013-10-30 阿里巴巴集团控股有限公司 Function module dynamic loading method and device based on jQuery framework
CN103856493A (en) * 2012-11-28 2014-06-11 纽海信息技术(上海)有限公司 Cross domain login system and method
CN103905477A (en) * 2012-12-25 2014-07-02 阿里巴巴集团控股有限公司 HTTP request processing method and server
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
CN104965690A (en) * 2014-04-18 2015-10-07 腾讯科技(深圳)有限公司 Method and apparatus for processing data
CN105306341A (en) * 2012-10-19 2016-02-03 北京奇虎科技有限公司 Message sending device and receiving device and method and system in browser
CN107203521A (en) * 2016-03-16 2017-09-26 阿里巴巴集团控股有限公司 Information processing method and device
CN108073627A (en) * 2016-11-16 2018-05-25 深圳联友科技有限公司 The JavaScript function call method and device of a kind of cross-domain webpage
CN108228181A (en) * 2017-12-29 2018-06-29 北京奇虎科技有限公司 The method and device of embedded html page in html page
CN108509229A (en) * 2017-12-26 2018-09-07 平安普惠企业管理有限公司 Method, terminal device and the computer readable storage medium of the cross-domain control of window
CN111026659A (en) * 2019-12-05 2020-04-17 南开大学 Mobile application callback analysis research method based on embedded representation

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104423973B (en) * 2013-08-20 2020-02-18 腾讯科技(深圳)有限公司 Processing method, device and system for floating frame page loading information
CN104714980B (en) * 2013-12-17 2018-04-06 阿里巴巴集团控股有限公司 Page nesting determining method of path and device
CN111954015B (en) * 2020-08-13 2021-07-20 南京百家云科技有限公司 Method and device for realizing online live broadcast classroom

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8250082B2 (en) * 2006-06-23 2012-08-21 Microsoft Corporation Cross domain communication
US7809785B2 (en) * 2007-05-28 2010-10-05 Google Inc. System using router in a web browser for inter-domain communication
CN101610194B (en) * 2008-06-17 2011-11-23 上海格尔软件股份有限公司 Method for AJAX cross-domain asynchronous transmission of high volume data
CN101615179B (en) * 2008-06-25 2011-08-17 国际商业机器公司 Method and system of cross-domain alternation for Web application

Cited By (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102446224B (en) * 2012-01-05 2013-06-05 苏州阔地网络科技有限公司 Multi-level webpage block clipping method
CN102446224A (en) * 2012-01-05 2012-05-09 苏州阔地网络科技有限公司 Multi-level webpage block clipping method
CN103246667A (en) * 2012-02-08 2013-08-14 腾讯科技(深圳)有限公司 Method and device for cross-domain transfer of data
CN103309861A (en) * 2012-03-07 2013-09-18 阿里巴巴集团控股有限公司 Method and device for acquiring cross-domain data
CN103377059A (en) * 2012-04-23 2013-10-30 阿里巴巴集团控股有限公司 Function module dynamic loading method and device based on jQuery framework
CN103377059B (en) * 2012-04-23 2016-09-28 阿里巴巴集团控股有限公司 Functional module dynamic loading method based on jQuery framework and device
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
CN103856493A (en) * 2012-11-28 2014-06-11 纽海信息技术(上海)有限公司 Cross domain login system and method
CN103856493B (en) * 2012-11-28 2019-02-12 北京京东尚科信息技术有限公司 Cross-domain login system and method
CN103905477A (en) * 2012-12-25 2014-07-02 阿里巴巴集团控股有限公司 HTTP request processing method and server
CN103905477B (en) * 2012-12-25 2018-04-27 阿里巴巴集团控股有限公司 A kind of method and server for handling HTTP request
CN104965690A (en) * 2014-04-18 2015-10-07 腾讯科技(深圳)有限公司 Method and apparatus for processing data
WO2015158304A1 (en) * 2014-04-18 2015-10-22 Tencent Technology (Shenzhen) Company Limited Data processing method and apparatus
US11455365B2 (en) 2014-04-18 2022-09-27 Tencent Technology (Shenzhen) Company Limited Data processing method and apparatus
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
CN107203521A (en) * 2016-03-16 2017-09-26 阿里巴巴集团控股有限公司 Information processing method and device
CN107203521B (en) * 2016-03-16 2020-09-04 阿里巴巴集团控股有限公司 Information processing method and device
CN108073627A (en) * 2016-11-16 2018-05-25 深圳联友科技有限公司 The JavaScript function call method and device of a kind of cross-domain webpage
CN108073627B (en) * 2016-11-16 2021-12-28 深圳联友科技有限公司 JavaScript function calling method and device for cross-domain webpage
CN108509229A (en) * 2017-12-26 2018-09-07 平安普惠企业管理有限公司 Method, terminal device and the computer readable storage medium of the cross-domain control of window
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
CN111026659A (en) * 2019-12-05 2020-04-17 南开大学 Mobile application callback analysis research method based on embedded representation
CN111026659B (en) * 2019-12-05 2023-04-21 南开大学 Mobile application callback analysis research method based on embedded representation

Also Published As

Publication number Publication date
CN102314469A (en) 2012-01-11

Similar Documents

Publication Publication Date Title
CN102043832A (en) Method for realizing cross-domain request callback on webpage
TWI387933B (en) Method and apparatus for providing secure inter-module communication mechanism
US20160162344A1 (en) Generation of representational state transfer interface from application programming interfaces
KR20110100622A (en) Techniques to automatically syndicate content over a network
CN102662600B (en) Method for mutually dragging files at different domain names
US7870412B2 (en) Passing client or server instructions via synchronized data objects
Li The myth and reality of Chinese Investors: A case study of Chinese Investment in Zambia's Copper Industry
WO2017084554A1 (en) Internet of things information system
US9876776B2 (en) Methods for generating and publishing a web site based on selected items and devices thereof
CN104954501A (en) Cross-domain information interactive method, device thereof and system thereof
US8789177B1 (en) Method and system for automatically obtaining web page content in the presence of redirects
Kennedy et al. StoRHm: a protocol adapter for mapping SOAP based Web Services to RESTful HTTP format
WO2019119974A1 (en) Object uploading method and device
US20180343216A1 (en) Context driven modification of attachments in a messaging session
CN102110144B (en) Document access method and terminal equipment
CN104811418A (en) Virus detection method and apparatus
GB2520668A (en) Portal environment and method for operating a portal environment
CN102314467A (en) Method for realizing synchronous browsing of web pages
US9734124B2 (en) Direct linked two way forms
CN103440134A (en) Webkit kernel-based storage resource service local extension method
CN103873564A (en) Method for realizing SignalR duplex communication under balanced load condition of multiple servers
AU2015231829A1 (en) Asset collection service through capture of content
EP3502925A1 (en) Computer system and method for extracting dynamic content from websites
CN110858240A (en) Front-end module loading method and device
Baer et al. Estimating the Benefits of the GridWise Initiative: Phase I Report

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

Open date: 20110504