[go: up one dir, main page]

CN104301379A - A webpage cross-domain communication method and device - Google Patents

A webpage cross-domain communication method and device Download PDF

Info

Publication number
CN104301379A
CN104301379A CN201410433474.5A CN201410433474A CN104301379A CN 104301379 A CN104301379 A CN 104301379A CN 201410433474 A CN201410433474 A CN 201410433474A CN 104301379 A CN104301379 A CN 104301379A
Authority
CN
China
Prior art keywords
page
data
domain name
target data
root domain
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
CN201410433474.5A
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.)
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing 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 Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201410433474.5A priority Critical patent/CN104301379A/en
Publication of CN104301379A publication Critical patent/CN104301379A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a web page cross-domain communication method and device. The method includes the steps that a first page with a first root domain name loads a second webpage with a second root domain name in the first page in an embedding mode; the second page adds target data from the second root domain name into a preset third page and skips to the third page, and the root domain name of the third page is the first root domain name; the third page extracts the contained target data from the second root domain name and stores the target data in storage space which the pages with the first root domain name can have access to; the first page reads the target data from the second root domain name from the storage space. The communication between the cross-domain web pages in a browser is achieved, cross-domain file transmission, data sharing and data synchronization can be achieved, meanwhile, the development cost is lowered, and the problem that different root domain names are mutually embedded is solved.

Description

一种网页跨域通信方法和装置A webpage cross-domain communication method and device

技术领域technical field

本发明涉及网页处理技术领域,具体涉及一种网页跨域通信方法,以及一种网页跨域通信装置。The present invention relates to the technical field of webpage processing, in particular to a webpage cross-domain communication method and a webpage cross-domain communication device.

背景技术Background technique

为了避免网页之间互相干扰造成的安全问题,在JavaScript中,有一个很重要的安全性限制,被称为同源策略(Same-Origin Policy),同源策略阻止从一个源加载的文档或脚本获取或设置另一个源加载的文档的属性。In order to avoid security problems caused by mutual interference between web pages, in JavaScript, there is a very important security restriction called Same-Origin Policy (Same-Origin Policy), which prevents documents or scripts loaded from one source Gets or sets a property of a document loaded by another source.

例如,浏览器的两个tab页中分别打开了http://www.360.cn/index.html和http://www.qihoo.com/index.html,其中,JavaScript1和JavaScript3是属于sina的脚本,而JavaScript2是属于163的脚本,当浏览器的tab1要运行一个脚本时,便会进行同源检查,只有和www.360.com同源的脚本才能被执行。所以,tab1只能执行JavaScript1和JavaScript3脚本,而JavaScript2不能执行,从而防止其他网页对本网页的非法篡改。For example, http://www.360.cn/index.html and http://www.qihoo.com/index.html are respectively opened in the two tab pages of the browser, where JavaScript1 and JavaScript3 belong to sina script, and JavaScript2 is a script belonging to 163. When tab1 of the browser wants to run a script, it will perform a same-origin check, and only scripts with the same origin as www.360.com can be executed. Therefore, tab1 can only execute JavaScript1 and JavaScript3 scripts, but JavaScript2 cannot, thereby preventing illegal tampering of this webpage by other webpages.

目前,支持JavaScript的浏览器普遍都使用了同源策略,这种策略阻止了不同源的网页之间的数据通信,丢失了跨域数据传递的便捷性。At present, browsers that support JavaScript generally use the same-origin policy, which prevents data communication between web pages of different origins and loses the convenience of cross-domain data transfer.

发明内容Contents of the invention

鉴于上述问题,提出了本发明以便提供一种克服上述问题的网页跨域通信方法和相应的网页跨域通信装置。In view of the above problems, the present invention is proposed to provide a web page cross-domain communication method and a corresponding web page cross-domain communication device that overcome the above problems.

依据本发明的一个方面,提供了一种网页跨域通信方法,包括:According to one aspect of the present invention, a webpage cross-domain communication method is provided, including:

具备第一根域名的第一页面在所述第一页面中以嵌入的方式加载具备第二根域名的第二页面;The first page with the first root domain name loads the second page with the second root domain name in an embedded manner in the first page;

所述第二页面将源自第二根域名的目标数据添加到预置的第三页面中,并跳转到所述第三页面,所述第三页面的根域名为第一根域名;The second page adds target data originating from the second root domain name to a preset third page, and jumps to the third page, where the root domain name of the third page is the first root domain name;

所述第三页面提取包含的所述源自第二根域名的目标数据,并保存到具备第一根域名的页面可访问的存储空间;The third page extracts the target data contained in the second root domain name, and saves it in a storage space accessible to pages with the first root domain name;

所述第一页面从所述存储空间中读取所述源自第二根域名的目标数据。The first page reads the target data originating from the second root domain name from the storage space.

可选地,所述具备第一根域名的第一页面在所述第一页面中以嵌入的方式加载具备第二根域名的第二页面包括:Optionally, the first page with the first root domain name loading the second page with the second root domain name in an embedded manner in the first page includes:

所述第一页面向第二根域名对应的第二服务器发送数据处理请求;The first page sends a data processing request to the second server corresponding to the second root domain name;

在发送所述数据处理请求之后,所述第一页面中预置的嵌入页面加载所述第二页面的页面地址,得到第二页面。After sending the data processing request, the embedded page preset in the first page loads the page address of the second page to obtain the second page.

可选地,所述第一页面中包含表单元素,所述表单元素的目标源地址为所述第二页面的页面地址,所述嵌入页面预置在所述表单元素中。Optionally, the first page includes a form element, the target source address of the form element is the page address of the second page, and the embedded page is preset in the form element.

可选地,所述第一页面向第二根域名对应的第二服务器发送数据处理请求包括:Optionally, the first page sending the data processing request to the second server corresponding to the second root domain name includes:

所述第一页面的表单元素向所述第二服务器发送向所述第二服务器上传数据的post请求,所述post请求携带请求处理的数据;The form element of the first page sends a post request to the second server to upload data to the second server, and the post request carries the data requested to be processed;

或,所述第一页面的表单元素向所述第二服务器发送从所述第二服务器获取数据的get请求,所述get请求携带请求处理的数据。Or, the form element of the first page sends a get request to the second server to obtain data from the second server, and the get request carries the data requested to be processed.

可选地,所述第一页面中预置的嵌入页面加载所述第二页面的页面地址,得到第二页面包括:Optionally, the embedded page preset in the first page loads the page address of the second page, and the obtained second page includes:

所述表单元素中的嵌入页面加载所述表单元素的目标源地址,得到第二页面。The embedded page in the form element loads the target source address of the form element to obtain the second page.

可选地,所述目标数据包括所述第二根域名对应的服务器针对所述第一页面发送的数据处理请求得到的全部数据处理结果、部分数据处理结果或所述数据处理结果的属性信息。Optionally, the target data includes all data processing results, partial data processing results, or attribute information of the data processing results obtained from the data processing request sent by the server corresponding to the second root domain name for the first page.

可选地,所述第二页面将源自第二根域名的目标数据添加到预置的第三页面中,并跳转到所述第三页面包括:Optionally, adding target data originating from the second root domain name to a preset third page on the second page, and jumping to the third page includes:

所述第二页面根据所述目标数据对应在所述第一根域名对应的第一服务器或所述第二服务器的存储地址与所述第一根域名组织第三页面的页面地址;The second page corresponds to the storage address of the first server or the second server corresponding to the first root domain name and the page address of the third page organized by the first root domain name according to the target data;

所述第二页面根据组织的页面地址跳转到第三页面。The second page jumps to the third page according to the page address of the organization.

可选地,所述第三页面提取包含的所述源自第二根域名的目标数据包括:Optionally, the target data derived from the second root domain name included in the extraction of the third page includes:

所述第三页面从所述第三页面的页面地址中提取所述源自第二根域名的目标数据对应的存储地址;The third page extracts the storage address corresponding to the target data originating from the second root domain name from the page address of the third page;

根据所述存储地址,从所述第一服务器或所述第二服务器中提取目标数据。Extract target data from the first server or the second server according to the storage address.

可选地,所述保存到具备第一根域名的页面可访问的存储空间包括:Optionally, the saving to the accessible storage space of the page with the first root domain name includes:

将所述源自第二根域名的目标数据保存到本地针对所述第一根域名划分的、以所述第一根域名为标识的存储空间;saving the target data originating from the second root domain name in a storage space designated locally for the first root domain name and identified by the first root domain name;

或,将所述源自第二根域名的目标数据以文件的方式保存到本地的存储空间,并在文件目录中记录所述目标数据的文件名称。Or, the target data originating from the second root domain name is saved in a local storage space as a file, and the file name of the target data is recorded in the file directory.

可选地,所述方法还包括:Optionally, the method also includes:

在将所述目标数据保存到具备第一根域名的页面可访问的存储空间之后,或在所述第三页面加载完成之后,所述第三页面触发嵌入页面加载完成事件。After the target data is saved to the storage space accessible by the page with the first root domain name, or after the loading of the third page is completed, the third page triggers an embedded page loading completion event.

可选地,所述第一页面从所述存储空间中读取所述源自第二根域名的目标数据包括:Optionally, reading the target data originating from the second root domain name from the storage space by the first page includes:

所述第一页面监控到所述嵌入页面加载完成事件时,从所述存储空间中读取所述源自第二根域名的目标数据。The first page reads the target data originating from the second root domain name from the storage space when the first page monitors the loading completion event of the embedded page.

根据本发明的另一方面,提供了一种网页跨域通信装置,包括第一页面、第二页面和第三页面;According to another aspect of the present invention, a web page cross-domain communication device is provided, including a first page, a second page, and a third page;

所述第一页面包括嵌入加载模块;The first page includes an embedded loading module;

所述嵌入加载模块,用于具备第一根域名的第一页面在所述第一页面中以嵌入的方式加载具备第二根域名的第二页面;The embedded loading module is used to load the second page with the second root domain name in an embedded manner in the first page on the first page with the first root domain name;

所述第二页面包括数据添加模块和页面跳转模块;The second page includes a data adding module and a page jump module;

所述数据添加模块,用于所述第二页面将源自第二根域名的目标数据添加到预置的第三页面中,所述第三页面的根域名为第一根域名;The data adding module is used for the second page to add the target data originating from the second root domain name to the preset third page, where the root domain name of the third page is the first root domain name;

所述页面跳转模块,用于跳转到所述第三页面;The page jump module is configured to jump to the third page;

所述第三页面包括数据提取模块和数据保存模块;The third page includes a data extraction module and a data storage module;

所述数据提取模块,用于提取包含的所述源自第二根域名的目标数据;The data extraction module is used to extract the contained target data originating from the second root domain name;

所述数据保存模块,用于保存到具备第一根域名的页面可访问的存储空间;The data storage module is used to store the data in a storage space accessible by pages with the first root domain name;

所述第一页面还包括数据读取模块;The first page also includes a data reading module;

所述数据读取模块,用于所述第一页面从所述存储空间中读取所述源自第二根域名的目标数据。The data reading module is used for the first page to read the target data originating from the second root domain name from the storage space.

可选地,所述嵌入加载模块包括:Optionally, the embedded loading module includes:

数据处理请求发送子模块,用于所述第一页面向第二根域名对应的第二服务器发送数据处理请求;A data processing request sending submodule, configured for the first page to send a data processing request to the second server corresponding to the second root domain name;

第二页面加载子模块,用于在发送所述数据处理请求之后,所述第一页面中预置的嵌入页面加载所述第二页面的页面地址,得到第二页面。The second page loading submodule is configured to load the page address of the second page from the embedded page preset in the first page after sending the data processing request to obtain the second page.

可选地,所述第一页面中包含表单元素,所述表单元素的目标源地址为所述第二页面的页面地址,所述嵌入页面预置在所述表单元素中。Optionally, the first page includes a form element, the target source address of the form element is the page address of the second page, and the embedded page is preset in the form element.

可选地,所述数据处理请求发送子模块包括:Optionally, the data processing request sending submodule includes:

post请求发送子单元,用于所述第一页面的表单元素向所述第二服务器发送向所述第二服务器上传数据的post请求,所述post请求携带请求处理的数据;The post request sending subunit is used for the form element of the first page to send a post request for uploading data to the second server to the second server, and the post request carries the data requested to be processed;

或,get请求发送子单元,用于所述第一页面的表单元素向所述第二服务器发送从所述第二服务器获取数据的get请求,所述get请求携带请求处理的数据。Or, the get request sending subunit is used for the form element of the first page to send a get request for obtaining data from the second server to the second server, where the get request carries the data requested to be processed.

可选地,所述第二页面加载子模块,具体用于所述表单元素中的嵌入页面加载所述表单元素的目标源地址,得到第二页面。Optionally, the second page loading submodule is specifically used to load the target source address of the form element to the embedded page in the form element to obtain the second page.

可选地,所述目标数据包括所述第二根域名对应的服务器针对所述第一页面发送的数据处理请求得到的全部数据处理结果、部分数据处理结果或所述数据处理结果的属性信息。Optionally, the target data includes all data processing results, partial data processing results, or attribute information of the data processing results obtained from the data processing request sent by the server corresponding to the second root domain name for the first page.

可选地,所述数据添加模块,具体用于所述第二页面根据所述目标数据对应在所述第一根域名对应的第一服务器或所述第二服务器的存储地址与所述第一根域名组织第三页面的页面地址;Optionally, the data adding module is specifically used for the second page to correspond to the storage address of the first server corresponding to the first root domain name or the storage address of the second server according to the target data and the first The page address of the third page of the root domain name organization;

所述页面跳转模块,具体用于所述第二页面根据组织的页面地址跳转到第三页面。The page jumping module is specifically used for jumping the second page to the third page according to the organized page address.

可选地,所述数据提取模块包括:Optionally, the data extraction module includes:

存储地址提取子模块,用于从所述第三页面的页面地址中提取所述源自第二根域名的目标数据;A storage address extraction submodule, configured to extract the target data originating from the second root domain name from the page address of the third page;

服务器数据提取子模块,用于根据所述存储地址,从所述第一服务器或所述第二服务器中提取目标数据。The server data extraction submodule is configured to extract target data from the first server or the second server according to the storage address.

可选地,所述数据保存模块,具体用于将所述源自第二根域名的目标数据保存到本地针对所述第一根域名划分的、以所述第一根域名为标识的存储空间;Optionally, the data saving module is specifically configured to save the target data originating from the second root domain name in a local storage space divided for the first root domain name and identified by the first root domain name ;

或,所述数据保存模块,具体用于将所述源自第二根域名的目标数据以文件的方式保存到本地的存储空间,并在文件目录中记录所述目标数据的文件名称。Or, the data saving module is specifically configured to save the target data originating from the second root domain name to a local storage space as a file, and record the file name of the target data in the file directory.

可选地,所述第三页面还包括:Optionally, the third page also includes:

事件触发模块,用于在将所述目标数据保存到具备第一根域名的页面可访问的存储空间之后,或在所述第三页面加载完成之后,所述第三页面触发嵌入页面加载完成事件。An event triggering module, configured to trigger an embedded page loading completion event on the third page after saving the target data to the storage space accessible by the page with the first root domain name, or after the loading of the third page is completed .

可选地,所述数据读取模块,具体用于所述第一页面监控到所述嵌入页面加载完成事件时,从所述存储空间中读取所述源自第二根域名的目标数据。Optionally, the data reading module is specifically configured to read the target data originating from the second root domain name from the storage space when the first page monitors the loading completion event of the embedded page.

依据本发明实施例,具备第一根域名的第一页面以嵌入的方式加载不同源、具备不同的第二根域名的第二页面,第二页面将从第二根域名获取的目标数据添加到具备第一根域名的第三页面中,并跳转到第三页面,第三页面与第一页面具备相同的第一根域名,可以由第三页面将目标数据保存到第一根域名可访问的存储空间,第一页面就可以直接从该存储空间读取到第二页面的目标数据,解决了浏览器中跨域网页之间的通信问题,可以实现跨域传输文件、数据共享和同步数据,同时降低了开发成本,减少了不同根域名之间的相互嵌套问题。According to the embodiment of the present invention, the first page with the first root domain name loads the second page with different sources and different second root domain names in an embedded manner, and the second page adds the target data obtained from the second root domain name to the In the third page with the first root domain name, and jump to the third page, the third page has the same first root domain name as the first page, and the third page can save the target data to the first root domain name to be accessible storage space, the first page can directly read the target data from the storage space to the second page, which solves the communication problem between cross-domain webpages in the browser, and can realize cross-domain file transfer, data sharing and data synchronization , while reducing development costs and reducing the mutual nesting problem between different root domain names.

其中,目标数据可以是第一页面所需求的数据在服务器的保存地址,通过将保存地址添加到第三页面,进而可以根据保存地址从服务器读取数据,使得第一页面所需求的数据的数据量不局限于第三页面保存数据的能力,大大增加了跨域名网页间的数据传输能力,通过提升服务器存储空间的兆级基本可以满足所有的跨域数据传输任务。Wherein, the target data may be the storage address of the data required by the first page in the server. By adding the storage address to the third page, the data can be read from the server according to the storage address, so that the data of the data required by the first page The amount is not limited to the ability to save data on the third page, which greatly increases the data transmission capacity between cross-domain web pages, and can basically meet all cross-domain data transmission tasks by increasing the megabytes of server storage space.

上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention, it can be implemented according to the contents of the description, and in order to make the above and other purposes, features and advantages of the present invention more obvious and understandable , the specific embodiments of the present invention are enumerated below.

附图说明Description of drawings

通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiment. The drawings are only for the purpose of illustrating a preferred embodiment and are not to be considered as limiting the invention. Also throughout the drawings, the same reference numerals are used to designate the same parts. In the attached picture:

图1示出了根据本发明一个实施例的网页跨域通信方法的流程图;FIG. 1 shows a flowchart of a webpage cross-domain communication method according to an embodiment of the present invention;

图2示出了根据本发明另一个实施例的网页跨域通信方法的流程图;FIG. 2 shows a flow chart of a webpage cross-domain communication method according to another embodiment of the present invention;

图3示出了根据本发明一个实施例的网页跨域通信装置的结构框图Fig. 3 shows a structural block diagram of a web page cross-domain communication device according to an embodiment of the present invention

图4示出了根据本发明另一个实施例的网页跨域通信装置的结构框图。Fig. 4 shows a structural block diagram of an apparatus for webpage cross-domain communication according to another embodiment of the present invention.

具体实施方式Detailed ways

下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

实施例1Example 1

参考图1,示出了根据本发明一个实施例的网页跨域通信方法的流程图,该方法具体可以包括以下步骤:Referring to FIG. 1 , it shows a flowchart of a webpage cross-domain communication method according to an embodiment of the present invention, and the method may specifically include the following steps:

步骤11、具备第一根域名的第一页面在所述第一页面中以嵌入的方式加载具备第二根域名的第二页面。Step 11. The first page with the first root domain name loads the second page with the second root domain name in an embedded manner in the first page.

本发明实施例中,第一页面与第二页面为不同源的网页,也即是其网页地址具备不同的根域名,例如,第一页面的网页地址为www.so.com,对应的第一根域名为so.com,第二页面的网页地址为www.i.so.com,对应的第二根域名为i.so.com。In the embodiment of the present invention, the first page and the second page are webpages of different sources, that is, their webpage addresses have different root domain names. For example, the webpage address of the first page is www.so.com, and the corresponding first The root domain name is so.com, the webpage address of the second page is www.i.so.com, and the corresponding second root domain name is i.so.com.

在第一页面中以嵌入的方式加载第二页面可以是任意可实现的方式,例如,通过嵌入iframe框架的方式,在宿主页面中包含子页面的位置插入“<IFRAME name="XXX"width=X height=X frameborder=0 src="XXX.htm"></IFRAME>”语句;或是使用Scriptlets组件技术,在宿主页面中包含子页面的位置插入“<OBJECT style="border:0px"type="text/x-scriptlet"data="XXX.htm"width=X Height=X></OBJECT>”语句;或是使用脚本文件技术通过在宿主页面中引入外部脚本文件来达到嵌入子页面的目的等。Loading the second page in an embedded manner in the first page can be in any achievable manner, for example, by embedding an iframe frame, inserting "<IFRAME name="XXX" width= X height=X frameborder=0 src="XXX.htm"></IFRAME>" statement; or use Scriptlets component technology to insert "<OBJECT style="border:0px"type ="text/x-scriptlet"data="XXX.htm"width=X Height=X></OBJECT>" statement; or use script file technology to achieve embedding in sub-pages by introducing external script files into the host page purpose etc.

步骤12、所述第二页面将源自第二根域名的目标数据添加到预置的第三页面中,并跳转到所述第三页面,所述第三页面的根域名为第一根域名。Step 12, the second page adds the target data from the second root domain name to the preset third page, and jumps to the third page, the root domain name of the third page is the first root domain name.

第二页面可以获取到源自第二根域名的目标数据,基于同源策略,与第二页面具备不同根域名的第一页面无法从第二页面目标数据。第二页面获取到目标数据后,将目标数据添加到预置的第三页面中,这样第三页面就获取了上述目标数据。The second page can obtain target data from the second root domain name. Based on the same-origin policy, the first page with a different root domain name from the second page cannot target data from the second page. After the second page acquires the target data, the target data is added to the preset third page, so that the third page acquires the aforementioned target data.

第二页面跳转到第三页面(302跳转),第三页面即是嵌入第一页面的子页面,由于第三页面与第一页面具有相同的根域名,因此第一页面和第三页面是同源页面。The second page jumps to the third page (302 jump), and the third page is a subpage embedded in the first page. Since the third page has the same root domain name as the first page, the first page and the third page is the same origin page.

本发明实施例中,将目标数据添加到第三页面中,可以是添加到第二页面的页面内容、页面地址或是页面的相关属性信息中,还可以是其他任意可实现的方式。In the embodiment of the present invention, the target data is added to the third page, which may be added to the page content, page address, or related attribute information of the second page, or any other practicable manner.

其中,第二页面可以通过任何可实现的方式获取源自第二根域名的目标数据,例如,可以对目标数据提前预置并保存,由第二页面临时从第二根域名对应的服务器接收或请求目标数据,或者,目标数据为第二页面的页面内容或是属性信息,从第二页面中可以提取目标数据等。Wherein, the second page can obtain the target data originating from the second root domain name in any feasible way, for example, the target data can be preset and saved in advance, and the second page can temporarily receive it from the server corresponding to the second root domain name or The target data is requested, or the target data is page content or attribute information of the second page, and the target data can be extracted from the second page.

步骤13、所述第三页面提取包含的所述源自第二根域名的目标数据,并保存到具备第一根域名的页面可访问的存储空间。Step 13. The third page extracts the included target data originating from the second root domain name, and saves it in a storage space accessible to pages with the first root domain name.

针对第一根域名预置存储空间,该存储空间仅供具备第一根域名的页面访问,第三页面将其包含的目标数据保存到预置的存储空间,以供其他具备第一根域名的页面访问目标数据。A storage space is preset for the first root domain name, which is only accessible to pages with the first root domain name, and the third page saves the target data contained in it to the preset storage space for other pages with the first root domain name Page access target data.

具体地,第三页面可以输出在页面中预置的脚本,由该脚本执行提取目标数据并保存的操作。Specifically, the third page may output a script preset on the page, and the script performs an operation of extracting and saving the target data.

步骤14、所述第一页面从所述存储空间中读取所述源自第二根域名的目标数据。Step 14, the first page reads the target data originating from the second root domain name from the storage space.

第一页面可以访问上述第一根域名对应的存储空间,可以直接从存储空间中读取目标数据,即读取了第二页面的目标数据,因此,解决了浏览器中跨域网页之间的通信问题,可以实现跨域传输文件、数据共享和同步数据,同时降低了开发成本,减少了不同根域名之间的相互嵌套问题。The first page can access the storage space corresponding to the above-mentioned first root domain name, and can directly read the target data from the storage space, that is, read the target data of the second page. Therefore, the problem between cross-domain web pages in the browser is solved. For communication issues, cross-domain file transfer, data sharing, and data synchronization can be realized, while development costs are reduced, and mutual nesting problems between different root domain names are reduced.

本发明实施例中,优选地,所述步骤11可以包括:In the embodiment of the present invention, preferably, the step 11 may include:

子步骤111、所述第一页面向第二根域名对应的第二服务器发送数据处理请求。Sub-step 111, the first page sends a data processing request to the second server corresponding to the second root domain name.

子步骤112、在发送所述数据处理请求之后,所述第一页面中预置的嵌入页面加载所述第二页面的页面地址,得到第二页面。Sub-step 112, after sending the data processing request, the embedded page preset in the first page loads the page address of the second page to obtain the second page.

第一页面首先请求第二根域名对应的第二服务器处理数据,进一步加载具备第二根域名的第二页面。在第一页面中预置嵌入页面,并指向第二页面的页面地址,在加载第一页面过程中,加载到嵌入页面时,嵌入页面加载第二页面的页面地址,就可以得到第二页面。The first page first requests the second server corresponding to the second root domain name to process data, and further loads the second page with the second root domain name. The embedded page is preset in the first page and points to the page address of the second page. During the loading of the first page, when the embedded page is loaded, the embedded page loads the page address of the second page to obtain the second page.

预置的嵌入页面可以是iframe子页面,iframe是一种HTML(HyperTextMark-up Language,超文本标记语言)标签,会创建包含另外一个文档的内联框架,即行内框架。在第一页面中创建iframe子页面,其指向的页面地址为第二页面的页面地址,加载iframe子页面就可以得到第二页面。在网页中编写元素<iframe src="需要嵌入的网页地址"width="子页面的宽度"height="高度"></iframe>。此处预置的iframe子页面可以是空白页面,避免耗费计算机资源进行页面加载。The preset embedded page may be an iframe subpage, and an iframe is an HTML (HyperTextMark-up Language, hypertext markup language) tag that creates an inline frame containing another document, that is, an inline frame. An iframe subpage is created in the first page, and the page address it points to is the page address of the second page, and the second page can be obtained by loading the iframe subpage. Write the element <iframe src="the address of the webpage to be embedded" width="the width of the subpage" height="height"></iframe> in the webpage. The iframe subpage preset here can be a blank page to avoid consuming computer resources for page loading.

进一步优选地,嵌入页面可以预置在页面元素中,并且可以根据实际需求预置在不同的页面元素中,例如,表单元素、区域元素、地址元素等。本发明实施例中,优选地,第一页面中包含表单元素,嵌入页面可以设置在第一页面的表单元素中。Further preferably, the embedded page can be preset in a page element, and can be preset in different page elements according to actual needs, for example, a form element, an area element, an address element, and the like. In the embodiment of the present invention, preferably, the first page contains a form element, and the embedded page can be set in the form element of the first page.

相应优选地,可以由表单元素触发数据处理请求,并由表单元素进一步控制第二页面的记载。具体地,所述子步骤111可以包括:Correspondingly preferably, the data processing request can be triggered by the form element, and the record of the second page can be further controlled by the form element. Specifically, the sub-step 111 may include:

子步骤111-1、所述第一页面的表单元素向所述第二服务器发送向所述第二服务器上传数据的post请求,所述post请求携带请求处理的数据。Sub-step 111-1, the form element of the first page sends a post request to the second server to upload data to the second server, and the post request carries the data requested to be processed.

或,子步骤111-2、所述第一页面的表单元素向所述第二服务器发送从所述第二服务器获取数据的get请求,所述get请求携带请求处理的数据。Or, in sub-step 111-2, the form element of the first page sends a get request to the second server to obtain data from the second server, and the get request carries the data requested to be processed.

Form提供了两种数据传输的方式,通过get请求和通过post请求。虽然它们都是数据的提交方式,但是在实际传输时确有很大的不同。Form provides two ways of data transmission, through get request and through post request. Although they are both ways of submitting data, they are quite different in actual transmission.

post是用来向服务器上传递数据,表单元素向第二服务器发送上传数据的post请求;get请求是用来从服务器上获得数据,表单元素向第二服务器发送获取数据的get请求。Post is used to transfer data to the server, and the form element sends a post request for uploading data to the second server; get request is used to obtain data from the server, and the form element sends a get request for obtaining data to the second server.

相比之下,更优选的是通过post请求的方式,主要原因在于:In contrast, the method of post request is more preferred, the main reasons are:

1、post请求的方式是将表单中的请求处理的数据放在form的数据体中,按照变量和值相对应的方式,传递到action所指向URL。get请求的方式将表单中请求处理的数据的按照variable=value的形式,添加到action所指向的URL后面,并且两者使用“?”连接,而各个变量之间使用“&”连接。1. The method of post request is to put the data processed by the request in the form into the data body of the form, and transfer it to the URL pointed to by the action according to the way of corresponding variables and values. In the get request method, the data requested in the form is added to the URL pointed to by the action in the form of variable=value, and the two are connected by "?", and the variables are connected by "&".

2、get请求的方式安全性较低,因为在传输过程,数据被放在请求的URL中,而如今现有的很多服务器、代理服务器或者用户代理都会将请求URL记录到日志文件中,然后放在某个地方,这样就可能会有一些隐私的信息被第三方看到。另外,用户也可以在浏览器上直接看到提交的数据,一些系统内部消息将会一同显示在用户面前。而post请求的方式的所有操作对用户来说都是不可见的。2. The security of the get request method is low, because during the transmission process, the data is placed in the URL of the request, and many existing servers, proxy servers or user agents will record the request URL in the log file, and then put Somewhere, so that some private information may be seen by third parties. In addition, the user can also directly see the submitted data on the browser, and some internal system information will be displayed in front of the user. All operations in the post request mode are invisible to the user.

3、由于受到URL长度限制,get请求的方式传输的数据量小;而post请求的方式可以传输大量的数据,所以在上传文件只能使用post。3. Due to the limitation of the URL length, the amount of data transmitted by the get request method is small; and the post request method can transmit a large amount of data, so only post can be used for uploading files.

4、get限制Form表单的数据集的值必须为ASCII字符;而post支持整个ISO10646字符集,适用于更多应用场景。4. Get restricts the value of the data set of the Form form to be ASCII characters; while post supports the entire ISO10646 character set, which is suitable for more application scenarios.

相应优选地,所述子步骤112可以包括:Correspondingly preferably, the sub-step 112 may include:

子步骤112-1、所述表单元素中的嵌入页面加载所述表单元素的目标源地址,得到第二页面。Sub-step 112-1, the embedded page in the form element loads the target source address of the form element to obtain the second page.

将表单元素的目标源地址设置为所述第二页面的页面地址,第二页面渲染到该表单元素时,表单元素控制嵌入页面加载该页面地址得到第二页面。The target source address of the form element is set as the page address of the second page, and when the second page is rendered to the form element, the form element controls the embedded page to load the page address to obtain the second page.

相应优选地,所述目标数据可以包括所述第二根域名对应的服务器针对所述第一页面发送的数据处理请求得到的全部数据处理结果、部分数据处理结果或所述数据处理结果的属性信息。Correspondingly preferably, the target data may include all data processing results obtained from the data processing request sent by the server corresponding to the second root domain name for the first page, part of the data processing results, or attribute information of the data processing results .

第二页面将源自第二根域名的目标数据添加到预置的第三页面中,可以是将目标数据添加到第三页面或是第三页面的页面地址中;也可以是将目标数据对应在服务器的存储地址添加到第三页面或是第三页面的页面地址中,这种方式可以增加传输数据的数据量,优选地,所述步骤12可以包括:The second page adds the target data from the second root domain name to the preset third page, which can be adding the target data to the third page or the page address of the third page; Adding the storage address of the server to the third page or the page address of the third page can increase the data volume of the transmitted data in this way. Preferably, the step 12 can include:

子步骤121、所述第二页面根据所述目标数据对应在所述第一根域名对应的第一服务器或所述第二服务器的存储地址与所述第一根域名组织第三页面的页面地址。Sub-step 121, the second page corresponds to the storage address of the first server or the second server corresponding to the first root domain name and the page address of the third page organized by the first root domain name according to the target data .

子步骤122、所述第二页面根据组织的页面地址跳转到第三页面。Sub-step 122, the second page jumps to the third page according to the page address of the organization.

目标数据可以保存在第一根域名对应的第一服务器或是第二根域名对应的第二服务器中,并对应有一个存储地址,根据该存储地址可以在服务器中提取目标数据。将该存储地址与第一根域名组织第三页面的页面地址,得到的第三页面的页面地址的根域名即为第一根域名,使第三页面与第一页面同源。The target data can be stored in the first server corresponding to the first root domain name or in the second server corresponding to the second root domain name, and corresponding to a storage address, the target data can be extracted from the server according to the storage address. The storage address is combined with the first root domain name to organize the page address of the third page, and the obtained root domain name of the page address of the third page is the first root domain name, so that the third page has the same origin as the first page.

在组织第三页面的页面地址后,第二页面可以直接跳转到该页面地址得到第三页面。After organizing the page address of the third page, the second page can directly jump to the page address to obtain the third page.

相应优选地,所述步骤13中所述第三页面提取包含的所述源自第二根域名的目标数据可以包括:Correspondingly preferably, the target data derived from the second root domain name included in the extraction of the third page in step 13 may include:

子步骤131、所述第三页面从所述第三页面的页面地址中提取所述源自第二根域名的目标数据对应的存储地址。Sub-step 131, the third page extracts the storage address corresponding to the target data originating from the second root domain name from the page address of the third page.

子步骤132、根据所述存储地址,从所述第一服务器或所述第二服务器中提取目标数据。Sub-step 132, extracting target data from the first server or the second server according to the storage address.

将目标数据的存储地址组织在第三页面的页面地址中,进而可以直接在页面地址中提取目标数据的存储地址,简单便捷,根据存储地址可以直接从服务器读取数据,使得第一页面所需求的数据的数据量不局限于第三页面保存数据的能力,大大增加了跨域名网页间的数据传输能力,通过提升服务器存储空间的兆级基本可以满足所有的跨域数据传输任务。The storage address of the target data is organized in the page address of the third page, and then the storage address of the target data can be directly extracted from the page address, which is simple and convenient, and the data can be read directly from the server according to the storage address, so that the first page needs The amount of data is not limited to the ability to save data on the third page, which greatly increases the data transmission capacity between cross-domain web pages, and can basically meet all cross-domain data transmission tasks by increasing the megabytes of server storage space.

其中,所述步骤13中所述保存到具备第一根域名的页面可访问的存储空间包括:Wherein, saving to the storage space accessible to the page with the first root domain name described in step 13 includes:

子步骤133、将所述源自第二根域名的目标数据保存到本地针对所述第一根域名划分的、以所述第一根域名为标识的存储空间。Sub-step 133: Save the target data from the second root domain name in a local storage space that is divided for the first root domain name and identified by the first root domain name.

或,子步骤134、将所述源自第二根域名的目标数据以文件的方式保存到本地的存储空间,并在文件目录中记录所述目标数据的文件名称。Or, in sub-step 134, save the target data originating from the second root domain name to a local storage space as a file, and record the file name of the target data in the file directory.

可以针对不同的根域名分配不同的存储空间,分别以各根域名为标识进行区分,例如,进行Localstorage存储,在HTML5中,本地存储是一个window的属性,包括localStorage(本地存储)和sessionStorage(会话存储),sessionStorage只是伴随着session,窗口一旦关闭就没了,而Localstorage用于持久化的本地存储,具有按根域名分块存储、不主动删除永不过期、兆级存储能力的特性。Different storage spaces can be allocated for different root domain names, which are identified by each root domain name. For example, Localstorage storage. In HTML5, local storage is a window attribute, including localStorage (local storage) and sessionStorage (session storage), sessionStorage is only accompanied by the session, once the window is closed, it will disappear, and Localstorage is used for persistent local storage, which has the characteristics of block storage according to the root domain name, no active deletion, never expires, and mega-level storage capabilities.

或是针对不同的根域名分配不同的用于存储目标数据的文件,并在存储空间保存一份文件目录,将各个文件的名称记录在文件目录中,例如Userdata存储,Userdata是微软为IE专门在系统中开辟的本地存储空间,是以文件目录为单位的存储,可以应用在Windows系统和IE浏览器的组合环境下。Or assign different files for storing target data for different root domain names, and save a file directory in the storage space, and record the names of each file in the file directory, such as Userdata storage. The local storage space opened up in the system is stored in the unit of file directory, which can be applied in the combined environment of Windows system and IE browser.

综上所述,依据本发明实施例,具备第一根域名的第一页面以嵌入的方式加载不同源、具备不同的第二根域名的第二页面,第二页面将从第二根域名获取的目标数据添加到具备第一根域名的第三页面中,并跳转到第三页面,第三页面与第一页面具备相同的第一根域名,可以由第三页面将目标数据保存到第一根域名可访问的存储空间,第一页面就可以直接从该存储空间读取到第二页面的目标数据,解决了浏览器中跨域网页之间的通信问题,可以实现跨域传输文件、数据共享和同步数据,同时降低了开发成本,减少了不同根域名之间的相互嵌套问题。To sum up, according to the embodiment of the present invention, the first page with the first root domain name loads the second page with a different source and a different second root domain name in an embedded manner, and the second page will be obtained from the second root domain name Add the target data to the third page with the first root domain name, and jump to the third page. The third page has the same first root domain name as the first page, and the third page can save the target data to the third page. A storage space accessible by a domain name, the first page can directly read the target data of the second page from this storage space, which solves the communication problem between cross-domain web pages in the browser, and can realize cross-domain transfer of files, Data sharing and synchronizing data, while reducing development costs, and reducing mutual nesting problems between different root domain names.

其中,目标数据可以是第一页面所需求的数据在服务器的保存地址,通过将保存地址添加到第三页面,进而可以根据保存地址从服务器读取数据,使得第一页面所需求的数据的数据量不局限于第三页面保存数据的能力,大大增加了跨域名网页间的数据传输能力,通过提升服务器存储空间的兆级基本可以满足所有的跨域数据传输任务。Wherein, the target data may be the storage address of the data required by the first page in the server. By adding the storage address to the third page, the data can be read from the server according to the storage address, so that the data of the data required by the first page The amount is not limited to the ability to save data on the third page, which greatly increases the data transmission capacity between cross-domain web pages, and can basically meet all cross-domain data transmission tasks by increasing the megabytes of server storage space.

实施例2Example 2

参考图2,示出了根据本发明另一个实施例的网页跨域通信方法的流程图,该方法具体可以包括以下步骤:Referring to FIG. 2 , it shows a flowchart of a webpage cross-domain communication method according to another embodiment of the present invention, and the method may specifically include the following steps:

步骤21、具备第一根域名的第一页面在所述第一页面中以嵌入的方式加载具备第二根域名的第二页面。Step 21: The first page with the first root domain name loads the second page with the second root domain name in an embedded manner in the first page.

步骤22、所述第二页面将源自第二根域名的目标数据添加到预置的第三页面中,并跳转到所述第三页面,所述第三页面的根域名为第一根域名。Step 22, the second page adds the target data from the second root domain name to the preset third page, and jumps to the third page, the root domain name of the third page is the first root domain name.

步骤23、所述第三页面提取包含的所述源自第二根域名的目标数据,并保存到具备第一根域名的页面可访问的存储空间。Step 23, the third page extracts the included target data originating from the second root domain name, and saves it in a storage space accessible to pages with the first root domain name.

步骤24、在将所述目标数据保存到具备第一根域名的页面可访问的存储空间之后,或在所述第三页面加载完成之后,所述第三页面触发嵌入页面加载完成事件。Step 24: After the target data is saved in the storage space accessible by the page with the first root domain name, or after the loading of the third page is completed, the third page triggers an embedded page loading completion event.

步骤25、所述第一页面监控到所述嵌入页面加载完成事件时,从所述存储空间中读取所述源自第二根域名的目标数据。Step 25, when the first page monitors the loading completion event of the embedded page, reads the target data originating from the second root domain name from the storage space.

与上个实施例不同的是,本实施例中,可以设定将目标数据保存到针对第一根域名设置的可访问的存储空间后,或是在第三页面加载完成后自动触发iframe的onload事件,onload事件是页面加载完成后执行的事件,第一页面可以在监控到第三页面中发生页面完成事件,从存储空间读取目标数据,由于存储数据和页面跳转的时间极短,通过该方案可以使第一页面尽快获取到从第二根域名获取的数据。Different from the previous embodiment, in this embodiment, it can be set to save the target data to the accessible storage space set for the first root domain name, or automatically trigger the onload of the iframe after the third page is loaded Event, the onload event is an event that is executed after the page is loaded. The first page can be monitored to the third page when a page completion event occurs, and the target data is read from the storage space. Since the time for storing data and page jump is extremely short, through This solution can enable the first page to obtain the data obtained from the second root domain name as soon as possible.

在具体的实现中,可以在第一页面绑定函数fn到iframe的onload事件,iframe的onload事件会调用第一页面的函数fn,函数fn控制获取可以取到目标数据。In a specific implementation, the function fn can be bound to the onload event of the iframe on the first page, and the onload event of the iframe will call the function fn of the first page, and the function fn controls the acquisition of target data.

综上所述,依据本发明实施例,具备第一根域名的第一页面以嵌入的方式加载不同源、具备不同的第二根域名的第二页面,第二页面将从第二根域名获取的目标数据添加到具备第一根域名的第三页面中,并跳转到第三页面,第三页面与第一页面具备相同的第一根域名,可以由第三页面将目标数据保存到第一根域名可访问的存储空间,第一页面就可以直接从该存储空间读取到第二页面的目标数据,解决了浏览器中跨域网页之间的通信问题,可以实现跨域传输文件、数据共享和同步数据,同时降低了开发成本,减少了不同根域名之间的相互嵌套问题。To sum up, according to the embodiment of the present invention, the first page with the first root domain name loads the second page with a different source and a different second root domain name in an embedded manner, and the second page will be obtained from the second root domain name Add the target data to the third page with the first root domain name, and jump to the third page. The third page has the same first root domain name as the first page, and the third page can save the target data to the third page. A storage space accessible by a domain name, the first page can directly read the target data of the second page from this storage space, which solves the communication problem between cross-domain web pages in the browser, and can realize cross-domain transfer of files, Data sharing and synchronizing data, while reducing development costs, and reducing mutual nesting problems between different root domain names.

其中,目标数据可以是第一页面所需求的数据在服务器的保存地址,通过将保存地址添加到第三页面,进而可以根据保存地址从服务器读取数据,使得第一页面所需求的数据的数据量不局限于第三页面保存数据的能力,大大增加了跨域名网页间的数据传输能力,通过提升服务器存储空间的兆级基本可以满足所有的跨域数据传输任务。Wherein, the target data may be the storage address of the data required by the first page in the server. By adding the storage address to the third page, the data can be read from the server according to the storage address, so that the data of the data required by the first page The amount is not limited to the ability to save data on the third page, which greatly increases the data transmission capacity between cross-domain web pages, and can basically meet all cross-domain data transmission tasks by increasing the megabytes of server storage space.

为使本领域技术人员更好地理解本发明,以下通过一个具体地示例对本发明实施例所述的网页跨域通信方法进行说明,其中,第一页面为a页面,对应根域名为www.so.com,第二页面为b页面,对应根域名为i.so.com,第三页面为c页面,与a页面同源。In order for those skilled in the art to better understand the present invention, a specific example is used below to illustrate the web page cross-domain communication method described in the embodiment of the present invention, wherein the first page is a page, and the corresponding root domain name is www.so .com, the second page is page b, the corresponding root domain name is i.so.com, and the third page is page c, which has the same origin as page a.

1、a页面有待处理的图片数据,在a页面利用表单元素发送携带图片数据的post/get请求到i.so.com的server端,其中,表单元素的目标源为一个空白iframe,a页面绑定函数fn。1. Page a has image data to be processed. On page a, a form element is used to send a post/get request carrying image data to the server of i.so.com. The target source of the form element is a blank iframe, and page a binds Determine the function fn.

2、当post/get请求发出,iframe会加载b页面。2. When the post/get request is issued, the iframe will load the b page.

3、i.so.com的server端接收post/get请求,对图片数据进行处理得到图片处理结果。3. The server side of i.so.com receives the post/get request, processes the image data to obtain the image processing result.

4、b页面根据server端返回的图片处理结果的存储地址组织的URL地址,302到该地址对应的c页面。4. The b page organizes the URL address according to the storage address of the image processing result returned by the server, and 302 goes to the c page corresponding to the address.

5、c页面输出前端脚本,前端脚本提取图片处理结果,利用localstorage/userdata将图片处理结果存到本地,成功后会触发iframe的onload事件5. Page c outputs the front-end script, the front-end script extracts the image processing result, uses localstorage/userdata to store the image processing result locally, and triggers the onload event of the iframe after success

6、iframe的onload事件会调用之前a页面的方法fn,利用fn可以取到本地保存的图片处理结果,至此,完成www.so.com和i.so.com不同域名之间的数据通信任务。6. The onload event of the iframe will call the method fn of the previous page a. Using fn, the image processing results saved locally can be obtained. So far, the data communication task between different domain names of www.so.com and i.so.com is completed.

实施例3Example 3

参考图3,其示出了根据本发明一个实施例的网页跨域通信装置的结构框图,具体可以包括第一页面31、第二页面32和第三页面33。Referring to FIG. 3 , it shows a structural block diagram of an apparatus for webpage cross-domain communication according to an embodiment of the present invention, which may specifically include a first page 31 , a second page 32 and a third page 33 .

所述第一页面31包括嵌入加载模块311;The first page 31 includes an embedded loading module 311;

所述嵌入加载模块311,用于具备第一根域名的第一页面在所述第一页面中以嵌入的方式加载具备第二根域名的第二页面;The embedded loading module 311 is configured to load a second page with a second root domain name in an embedded manner in the first page on the first page with the first root domain name;

所述第二页面包括数据添加模块321和页面跳转模块322;The second page includes a data adding module 321 and a page jump module 322;

所述数据添加模块321,用于所述第二页面将源自第二根域名的目标数据添加到预置的第三页面中,所述第三页面的根域名为第一根域名;The data adding module 321 is used for the second page to add the target data originating from the second root domain name to the preset third page, where the root domain name of the third page is the first root domain name;

所述页面跳转模块322,用于跳转到所述第三页面;The page jump module 322 is configured to jump to the third page;

所述第三页面33包括数据提取模块331和数据保存模块332;The third page 33 includes a data extraction module 331 and a data storage module 332;

所述数据提取模块331,用于提取包含的所述源自第二根域名的目标数据;The data extraction module 331 is configured to extract the included target data originating from the second root domain name;

所述数据保存模块332,用于保存到具备第一根域名的页面可访问的存储空间;The data storage module 332 is configured to store the data in a storage space accessible to pages with the first root domain name;

所述第一页面还包括数据读取模块312;The first page also includes a data reading module 312;

所述数据读取模块312,用于所述第一页面从所述存储空间中读取所述源自第二根域名的目标数据。The data reading module 312 is used for the first page to read the target data originating from the second root domain name from the storage space.

本发明实施例中,优选地,所述嵌入加载模块包括:In the embodiment of the present invention, preferably, the embedded loading module includes:

数据处理请求发送子模块,用于所述第一页面向第二根域名对应的第二服务器发送数据处理请求;A data processing request sending submodule, configured for the first page to send a data processing request to the second server corresponding to the second root domain name;

第二页面加载子模块,用于在发送所述数据处理请求之后,所述第一页面中预置的嵌入页面加载所述第二页面的页面地址,得到第二页面。The second page loading submodule is configured to load the page address of the second page from the embedded page preset in the first page after sending the data processing request to obtain the second page.

本发明实施例中,优选地,所述第一页面中包含表单元素,所述表单元素的目标源地址为所述第二页面的页面地址,所述嵌入页面预置在所述表单元素中。In the embodiment of the present invention, preferably, the first page includes a form element, the target source address of the form element is the page address of the second page, and the embedded page is preset in the form element.

本发明实施例中,优选地,所述数据处理请求发送子模块包括:In the embodiment of the present invention, preferably, the data processing request sending submodule includes:

post请求发送子单元,用于所述第一页面的表单元素向所述第二服务器发送向所述第二服务器上传数据的post请求,所述post请求携带请求处理的数据;The post request sending subunit is used for the form element of the first page to send a post request for uploading data to the second server to the second server, and the post request carries the data requested to be processed;

或,get请求发送子单元,用于所述第一页面的表单元素向所述第二服务器发送从所述第二服务器获取数据的get请求,所述get请求携带请求处理的数据。Or, the get request sending subunit is used for the form element of the first page to send a get request for obtaining data from the second server to the second server, where the get request carries the data requested to be processed.

本发明实施例中,优选地,所述第二页面加载子模块,具体用于所述表单元素中的嵌入页面加载所述表单元素的目标源地址,得到第二页面。In the embodiment of the present invention, preferably, the second page loading submodule is specifically used to load the target source address of the form element to the embedded page in the form element to obtain the second page.

本发明实施例中,优选地,所述目标数据包括所述第二根域名对应的服务器针对所述第一页面发送的数据处理请求得到的全部数据处理结果、部分数据处理结果或所述数据处理结果的属性信息。In the embodiment of the present invention, preferably, the target data includes all data processing results, partial data processing results, or the data processing results obtained from the data processing request sent by the server corresponding to the second root domain name for the first page. Attribute information for the result.

本发明实施例中,优选地,所述数据添加模块,具体用于所述第二页面根据所述目标数据对应在所述第一根域名对应的第一服务器或所述第二服务器的存储地址与所述第一根域名组织第三页面的页面地址;In the embodiment of the present invention, preferably, the data adding module is specifically used for the second page to correspond to the storage address of the first server corresponding to the first root domain name or the storage address of the second server according to the target data The page address of the third page organized with the first root domain name;

所述页面跳转模块,具体用于所述第二页面根据组织的页面地址跳转到第三页面。The page jumping module is specifically used for jumping the second page to the third page according to the organized page address.

本发明实施例中,优选地,所述数据提取模块包括:In the embodiment of the present invention, preferably, the data extraction module includes:

存储地址提取子模块,用于从所述第三页面的页面地址中提取所述源自第二根域名的目标数据;A storage address extraction submodule, configured to extract the target data originating from the second root domain name from the page address of the third page;

服务器数据提取子模块,用于根据所述存储地址,从所述第一服务器或所述第二服务器中提取目标数据。The server data extraction submodule is configured to extract target data from the first server or the second server according to the storage address.

本发明实施例中,优选地,所述数据保存模块,具体用于将所述源自第二根域名的目标数据保存到本地针对所述第一根域名划分的、以所述第一根域名为标识的存储空间;In the embodiment of the present invention, preferably, the data saving module is specifically configured to save the target data originating from the second root domain name locally in the first root domain name divided for the first root domain name is the storage space identified;

或,所述数据保存模块,具体用于将所述源自第二根域名的目标数据以文件的方式保存到本地的存储空间,并在文件目录中记录所述目标数据的文件名称。Or, the data saving module is specifically configured to save the target data originating from the second root domain name to a local storage space as a file, and record the file name of the target data in the file directory.

依据本发明实施例,具备第一根域名的第一页面以嵌入的方式加载不同源、具备不同的第二根域名的第二页面,第二页面将从第二根域名获取的目标数据添加到具备第一根域名的第三页面中,并跳转到第三页面,第三页面与第一页面具备相同的第一根域名,可以由第三页面将目标数据保存到第一根域名可访问的存储空间,第一页面就可以直接从该存储空间读取到第二页面的目标数据,解决了浏览器中跨域网页之间的通信问题,可以实现跨域传输文件、数据共享和同步数据,同时降低了开发成本,减少了不同根域名之间的相互嵌套问题。According to the embodiment of the present invention, the first page with the first root domain name loads the second page with different sources and different second root domain names in an embedded manner, and the second page adds the target data obtained from the second root domain name to the In the third page with the first root domain name, and jump to the third page, the third page has the same first root domain name as the first page, and the third page can save the target data to the first root domain name to be accessible storage space, the first page can directly read the target data from the storage space to the second page, which solves the communication problem between cross-domain webpages in the browser, and can realize cross-domain file transfer, data sharing and data synchronization , while reducing development costs and reducing the mutual nesting problem between different root domain names.

其中,目标数据可以是第一页面所需求的数据在服务器的保存地址,通过将保存地址添加到第三页面,进而可以根据保存地址从服务器读取数据,使得第一页面所需求的数据的数据量不局限于第三页面保存数据的能力,大大增加了跨域名网页间的数据传输能力,通过提升服务器存储空间的兆级基本可以满足所有的跨域数据传输任务。Wherein, the target data may be the storage address of the data required by the first page in the server. By adding the storage address to the third page, the data can be read from the server according to the storage address, so that the data of the data required by the first page The amount is not limited to the ability to save data on the third page, which greatly increases the data transmission capacity between cross-domain web pages, and can basically meet all cross-domain data transmission tasks by increasing the megabytes of server storage space.

实施例4Example 4

参考图4,其示出了根据本发明另一个实施例的网页跨域通信装置的结构框图,具体可以包括第一页面41、第二页面42和第三页面43。Referring to FIG. 4 , it shows a structural block diagram of an apparatus for webpage cross-domain communication according to another embodiment of the present invention, which may specifically include a first page 41 , a second page 42 and a third page 43 .

所述第一页面41包括嵌入加载模块411;The first page 41 includes an embedded loading module 411;

所述嵌入加载模块411,用于具备第一根域名的第一页面在所述第一页面中以嵌入的方式加载具备第二根域名的第二页面;The embedded loading module 411 is configured to load a second page with a second root domain name in an embedded manner in the first page on the first page with the first root domain name;

所述第二页面包括数据添加模块421和页面跳转模块422;The second page includes a data adding module 421 and a page jump module 422;

所述数据添加模块421,用于所述第二页面将源自第二根域名的目标数据添加到预置的第三页面中,所述第三页面的根域名为第一根域名;The data adding module 421 is used for the second page to add the target data originating from the second root domain name to the preset third page, where the root domain name of the third page is the first root domain name;

所述页面跳转模块422,用于跳转到所述第三页面;The page jump module 422 is configured to jump to the third page;

所述第三页面43包括数据提取模块431、数据保存模块432和事件触发模块433;The third page 43 includes a data extraction module 431, a data storage module 432 and an event trigger module 433;

所述数据提取模块431,用于提取包含的所述源自第二根域名的目标数据;The data extraction module 431 is configured to extract the included target data originating from the second root domain name;

所述数据保存模块432,用于保存到具备第一根域名的页面可访问的存储空间;The data saving module 432 is configured to save the data in a storage space accessible to pages with the first root domain name;

事件触发模块433,用于在将所述目标数据保存到具备第一根域名的页面可访问的存储空间之后,或在所述第三页面加载完成之后,所述第三页面触发嵌入页面加载完成事件。The event triggering module 433 is configured to trigger the third page to trigger the completion of loading of the embedded page after the target data is saved to the storage space accessible by the page with the first root domain name, or after the loading of the third page is completed event.

所述第一页面还包括数据读取模块412;The first page also includes a data reading module 412;

所述数据读取模块412,具体用于所述第一页面监控到所述嵌入页面加载完成事件时,从所述存储空间中读取所述源自第二根域名的目标数据。The data reading module 412 is specifically configured to read the target data originating from the second root domain name from the storage space when the first page monitors the loading completion event of the embedded page.

依据本发明实施例,具备第一根域名的第一页面以嵌入的方式加载不同源、具备不同的第二根域名的第二页面,第二页面将从第二根域名获取的目标数据添加到具备第一根域名的第三页面中,并跳转到第三页面,第三页面与第一页面具备相同的第一根域名,可以由第三页面将目标数据保存到第一根域名可访问的存储空间,第一页面就可以直接从该存储空间读取到第二页面的目标数据,解决了浏览器中跨域网页之间的通信问题,可以实现跨域传输文件、数据共享和同步数据,同时降低了开发成本,减少了不同根域名之间的相互嵌套问题。According to the embodiment of the present invention, the first page with the first root domain name loads the second page with different sources and different second root domain names in an embedded manner, and the second page adds the target data obtained from the second root domain name to the In the third page with the first root domain name, and jump to the third page, the third page has the same first root domain name as the first page, and the third page can save the target data to the first root domain name to be accessible storage space, the first page can directly read the target data from the storage space to the second page, which solves the communication problem between cross-domain webpages in the browser, and can realize cross-domain file transfer, data sharing and data synchronization , while reducing development costs and reducing the mutual nesting problem between different root domain names.

其中,目标数据可以是第一页面所需求的数据在服务器的保存地址,通过将保存地址添加到第三页面,进而可以根据保存地址从服务器读取数据,使得第一页面所需求的数据的数据量不局限于第三页面保存数据的能力,大大增加了跨域名网页间的数据传输能力,通过提升服务器存储空间的兆级基本可以满足所有的跨域数据传输任务。Wherein, the target data may be the storage address of the data required by the first page in the server. By adding the storage address to the third page, the data can be read from the server according to the storage address, so that the data of the data required by the first page The amount is not limited to the ability to save data on the third page, which greatly increases the data transmission capacity between cross-domain web pages, and can basically meet all cross-domain data transmission tasks by increasing the megabytes of server storage space.

由于所述装置实施例基本相应于前述图1和图2所示的方法实施例,故本实施例的描述中未详尽之处,可以参见前述实施例中的相关说明,在此就不赘述了。Since the device embodiment basically corresponds to the method embodiment shown in Figure 1 and Figure 2 above, for details not described in this embodiment, you can refer to the relevant description in the previous embodiment, and will not go into details here .

在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。The algorithms and displays presented herein are not inherently related to any particular computer, virtual system, or other device. Various generic systems can also be used with the teachings based on this. The structure required to construct such a system is apparent from the above description. Furthermore, the present invention is not specific to any particular programming language. It should be understood that various programming languages can be used to implement the content of the present invention described herein, and the above description of specific languages is for disclosing the best mode of the present invention.

在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure the understanding of this description.

类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, in order to streamline this disclosure and to facilitate an understanding of one or more of the various inventive aspects, various features of the invention are sometimes grouped together in a single embodiment, figure, or its description. This method of disclosure, however, is not to be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.

本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art can understand that the modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment. Modules or units or components in the embodiments may be combined into one module or unit or component, and furthermore may be divided into a plurality of sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings) and any method or method so disclosed may be used in any combination, except that at least some of such features and/or processes or units are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.

此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, those skilled in the art will understand that although some embodiments described herein include some features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the invention. and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.

本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的网页跨域通信设备中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all functions of some or all components in the web page cross-domain communication device according to the embodiment of the present invention. The present invention can also be implemented as an apparatus or an apparatus program (for example, a computer program and a computer program product) for performing a part or all of the methods described herein. Such a program for realizing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet site, or provided on a carrier signal, or provided in any other form.

应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means can be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. does not indicate any order. These words can be interpreted as names.

Claims (10)

1. a webpage cross-domain communication method, comprising:
The first page possessing the first rhizosphere name loads in the mode embedded second page possessing the second rhizosphere name in described first page;
The target data being derived from the second rhizosphere name is added in the 3rd preset page by described second page, and jumps to described 3rd page, the rhizosphere first rhizosphere name by name of described 3rd page;
Be derived from the target data of the second rhizosphere name described in described 3rd page extraction comprises, and be saved in the addressable memory space of the page possessing the first rhizosphere name;
The target data of the second rhizosphere name is derived from described in described first page reads from described memory space.
2. the method for claim 1, wherein described in possess the first rhizosphere name first page in described first page, load in the mode embedded the second page face possessing the second rhizosphere name comprise:
Described first page sends data processing request to the second server of the second rhizosphere name correspondence;
After the described data processing request of transmission, the embedding page preset in described first page loads the page address of described second page, obtains second page.
3. the method as described in any one of claim 1-2, wherein, comprises Form Element in described first page, and the target source address of described Form Element is the page address of described second page, and the described embedding page is preset in described Form Element.
4. the method as described in any one of claim 1-3, wherein, described first page comprises to the second server transmission data processing request of the second rhizosphere name correspondence:
The post that the Form Element of described first page sends to described second server uploading data to described second server asks, and the data of request process are carried in described post request;
Or the Form Element of described first page sends the get request obtaining data from described second server to described second server, the data of request process are carried in described get request.
5. the method as described in any one of claim 1-4, wherein, the embedding page preset in described first page loads the page address of described second page, obtains second page face and comprises:
The embedding page in described Form Element loads the target source address of described Form Element, obtains second page.
6. the method as described in any one of claim 1-5, wherein, the attribute information of total data result, partial data result or described data processed result that the server that described target data comprises described second rhizosphere name correspondence obtains for the data processing request that described first page sends.
7. the method as described in any one of claim 1-6, wherein, the target data being derived from the second rhizosphere name is added in the 3rd preset page by described second page, and jumps to described 3rd page and comprise:
Described second page is according to the corresponding page address at the described first server of the first rhizosphere name correspondence or the memory address of described second server and described first rhizosphere name tissue the 3rd page of described target data;
Described second page jumps to the 3rd page according to the page address of tissue.
8. the method as described in any one of claim 1-7, wherein, described in be saved in the addressable memory space of the page possessing the first rhizosphere name and comprise:
The described target data being derived from the second rhizosphere name is saved in local that divide for described first rhizosphere name, be called mark with described first rhizosphere memory space;
Or, the described target data being derived from the second rhizosphere name is saved in local memory space in the mode of file, and in file directory, records the file name of described target data.
9. a webpage cross-domain communication device, comprises first page, second page and the 3rd page;
Described first page comprises embedding load-on module;
Described embedding load-on module, loads in the mode embedded second page possessing the second rhizosphere name for the first page possessing the first rhizosphere name in described first page;
Described second page face comprises data and adds module and page jump module;
Described data add module, add in the 3rd preset page for described second page by the target data being derived from the second rhizosphere name, the rhizosphere first rhizosphere name by name of described 3rd page;
Described page jump module, for jumping to described 3rd page;
Described 3rd page comprises data extraction module and data storage module;
Described data extraction module, for extract comprise described in be derived from the target data of the second rhizosphere name;
Described data storage module, for being saved in the addressable memory space of the page possessing the first rhizosphere name;
Described first page also comprises data read module;
Described data read module, is derived from the target data of the second rhizosphere name for described first page from described memory space described in reading.
10. device as claimed in claim 9, wherein, described embedding load-on module comprises:
Data processing request sends submodule, for the second server transmission data processing request of described first page to the second rhizosphere name correspondence;
Second page loads submodule, and for after the described data processing request of transmission, the embedding page preset in described first page loads the page address of described second page, obtains second page.
CN201410433474.5A 2014-08-28 2014-08-28 A webpage cross-domain communication method and device Pending CN104301379A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410433474.5A CN104301379A (en) 2014-08-28 2014-08-28 A webpage cross-domain communication method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410433474.5A CN104301379A (en) 2014-08-28 2014-08-28 A webpage cross-domain communication method and device

Publications (1)

Publication Number Publication Date
CN104301379A true CN104301379A (en) 2015-01-21

Family

ID=52320942

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410433474.5A Pending CN104301379A (en) 2014-08-28 2014-08-28 A webpage cross-domain communication method and device

Country Status (1)

Country Link
CN (1) CN104301379A (en)

Cited By (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105045887A (en) * 2015-07-24 2015-11-11 苏州工业园区迪锐信信息科技有限责任公司 Mixed mode cross-domain data interaction system and method
CN105930392A (en) * 2016-04-15 2016-09-07 北京思特奇信息技术股份有限公司 Cross-domain IFRAME height adaption method based on message transmission and system thereof
CN106294648A (en) * 2016-08-03 2017-01-04 腾讯科技(深圳)有限公司 A kind of processing method and processing device for page access path
CN106790754A (en) * 2016-12-26 2017-05-31 腾讯科技(深圳)有限公司 The player method and server of a kind of media information
CN107038194A (en) * 2016-11-17 2017-08-11 阿里巴巴集团控股有限公司 A kind of method for page jump and device
CN107797837A (en) * 2017-08-30 2018-03-13 上海壹账通金融科技有限公司 Page display method, device, server and medium
CN107948329A (en) * 2018-01-03 2018-04-20 湖南麓山云数据科技服务有限公司 A kind of cross-domain processing method and system
CN108200126A (en) * 2017-12-19 2018-06-22 阿里巴巴集团控股有限公司 Object method for uploading and device
CN108255878A (en) * 2016-12-29 2018-07-06 北京国双科技有限公司 User information processing method and relevant apparatus
CN108416214A (en) * 2018-03-16 2018-08-17 北京奇虎科技有限公司 Webpage digs mine means of defence and device
CN108509454A (en) * 2017-02-27 2018-09-07 阿里巴巴集团控股有限公司 A kind of operating method and relevant apparatus of character string
CN109002495A (en) * 2018-06-28 2018-12-14 郑州云海信息技术有限公司 Date storage method and device
CN109508273A (en) * 2018-09-21 2019-03-22 广东电网有限责任公司珠海供电局 Web-based electric vehicle charging station monitoring system and data acquisition method
CN109670132A (en) * 2018-12-18 2019-04-23 北京城市网邻信息技术有限公司 A kind of page method for drafting, device, terminal device and storage medium
CN109840114A (en) * 2017-11-24 2019-06-04 阿里巴巴集团控股有限公司 Page processing method and mobile terminal
CN110300133A (en) * 2018-03-22 2019-10-01 财付通支付科技有限公司 Cross-domain data transmission method, apparatus, equipment and storage medium
CN110362773A (en) * 2019-06-18 2019-10-22 中国平安人寿保险股份有限公司 Cross-domain communication method, device, computer equipment and storage medium
CN110889061A (en) * 2019-11-12 2020-03-17 望海康信(北京)科技股份公司 Webpage loading method and device
CN111385336A (en) * 2018-12-29 2020-07-07 广州市百果园信息技术有限公司 Page communication method and device, computer equipment and storage medium
CN111767500A (en) * 2020-06-23 2020-10-13 平安普惠企业管理有限公司 Data storage sharing method and device, computer equipment and storage medium
CN112818270A (en) * 2021-01-25 2021-05-18 上海哔哩哔哩科技有限公司 Data cross-domain transfer method and device and computer equipment
CN113282856A (en) * 2021-06-09 2021-08-20 京东方科技集团股份有限公司 Cross-domain data processing method, device, equipment and storage medium
CN113918865A (en) * 2021-11-18 2022-01-11 网易(杭州)网络有限公司 Data processing method, data processing apparatus, storage medium, and electronic apparatus
CN114118948A (en) * 2021-11-09 2022-03-01 浪潮软件股份有限公司 Method for realizing cross-regional communication of government affair service
CN114357438A (en) * 2021-12-31 2022-04-15 杭州乒乓智能技术有限公司 Defense method, device, storage medium and server for cross-site scripting attack
CN114461964A (en) * 2022-01-30 2022-05-10 中国工商银行股份有限公司 Webpage skipping method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101075240A (en) * 2006-08-25 2007-11-21 腾讯科技(深圳)有限公司 Method and system for spanned acquiring data
CN101662460A (en) * 2008-08-25 2010-03-03 阿里巴巴集团控股有限公司 Method, system and device for cross-domain communication
CN102043832A (en) * 2010-11-23 2011-05-04 苏州阔地网络科技有限公司 Method for realizing cross-domain request callback on webpage
CN102184220A (en) * 2011-05-06 2011-09-14 中兴通讯股份有限公司 Cross-domain page display control method and device
CN103246667A (en) * 2012-02-08 2013-08-14 腾讯科技(深圳)有限公司 Method and device for cross-domain transfer of data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101075240A (en) * 2006-08-25 2007-11-21 腾讯科技(深圳)有限公司 Method and system for spanned acquiring data
CN101662460A (en) * 2008-08-25 2010-03-03 阿里巴巴集团控股有限公司 Method, system and device for cross-domain communication
CN102043832A (en) * 2010-11-23 2011-05-04 苏州阔地网络科技有限公司 Method for realizing cross-domain request callback on webpage
CN102184220A (en) * 2011-05-06 2011-09-14 中兴通讯股份有限公司 Cross-domain page display control method and device
CN103246667A (en) * 2012-02-08 2013-08-14 腾讯科技(深圳)有限公司 Method and device for cross-domain transfer of data

Cited By (32)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105045887A (en) * 2015-07-24 2015-11-11 苏州工业园区迪锐信信息科技有限责任公司 Mixed mode cross-domain data interaction system and method
CN105045887B (en) * 2015-07-24 2018-06-22 苏州工业园区迪锐信信息科技有限责任公司 The system and method for mixed mode cross-domain data interaction
CN105930392A (en) * 2016-04-15 2016-09-07 北京思特奇信息技术股份有限公司 Cross-domain IFRAME height adaption method based on message transmission and system thereof
CN106294648A (en) * 2016-08-03 2017-01-04 腾讯科技(深圳)有限公司 A kind of processing method and processing device for page access path
CN107038194A (en) * 2016-11-17 2017-08-11 阿里巴巴集团控股有限公司 A kind of method for page jump and device
CN106790754A (en) * 2016-12-26 2017-05-31 腾讯科技(深圳)有限公司 The player method and server of a kind of media information
CN106790754B (en) * 2016-12-26 2020-01-10 腾讯科技(深圳)有限公司 Media information playing method and server
CN108255878A (en) * 2016-12-29 2018-07-06 北京国双科技有限公司 User information processing method and relevant apparatus
CN108509454A (en) * 2017-02-27 2018-09-07 阿里巴巴集团控股有限公司 A kind of operating method and relevant apparatus of character string
CN108509454B (en) * 2017-02-27 2022-03-08 阿里巴巴集团控股有限公司 Operation method of character string and related device
CN107797837A (en) * 2017-08-30 2018-03-13 上海壹账通金融科技有限公司 Page display method, device, server and medium
CN107797837B (en) * 2017-08-30 2020-11-03 深圳壹账通智能科技有限公司 Page display method, device, server and medium
CN109840114A (en) * 2017-11-24 2019-06-04 阿里巴巴集团控股有限公司 Page processing method and mobile terminal
CN108200126A (en) * 2017-12-19 2018-06-22 阿里巴巴集团控股有限公司 Object method for uploading and device
CN107948329A (en) * 2018-01-03 2018-04-20 湖南麓山云数据科技服务有限公司 A kind of cross-domain processing method and system
CN108416214A (en) * 2018-03-16 2018-08-17 北京奇虎科技有限公司 Webpage digs mine means of defence and device
CN110300133A (en) * 2018-03-22 2019-10-01 财付通支付科技有限公司 Cross-domain data transmission method, apparatus, equipment and storage medium
CN109002495A (en) * 2018-06-28 2018-12-14 郑州云海信息技术有限公司 Date storage method and device
CN109508273A (en) * 2018-09-21 2019-03-22 广东电网有限责任公司珠海供电局 Web-based electric vehicle charging station monitoring system and data acquisition method
CN109670132A (en) * 2018-12-18 2019-04-23 北京城市网邻信息技术有限公司 A kind of page method for drafting, device, terminal device and storage medium
CN111385336A (en) * 2018-12-29 2020-07-07 广州市百果园信息技术有限公司 Page communication method and device, computer equipment and storage medium
CN110362773A (en) * 2019-06-18 2019-10-22 中国平安人寿保险股份有限公司 Cross-domain communication method, device, computer equipment and storage medium
CN110362773B (en) * 2019-06-18 2023-11-03 中国平安人寿保险股份有限公司 Cross-domain communication method, device, computer equipment and storage medium
CN110889061A (en) * 2019-11-12 2020-03-17 望海康信(北京)科技股份公司 Webpage loading method and device
CN111767500A (en) * 2020-06-23 2020-10-13 平安普惠企业管理有限公司 Data storage sharing method and device, computer equipment and storage medium
CN112818270A (en) * 2021-01-25 2021-05-18 上海哔哩哔哩科技有限公司 Data cross-domain transfer method and device and computer equipment
CN112818270B (en) * 2021-01-25 2023-07-25 上海哔哩哔哩科技有限公司 Data cross-domain transfer method and device and computer equipment
CN113282856A (en) * 2021-06-09 2021-08-20 京东方科技集团股份有限公司 Cross-domain data processing method, device, equipment and storage medium
CN114118948A (en) * 2021-11-09 2022-03-01 浪潮软件股份有限公司 Method for realizing cross-regional communication of government affair service
CN113918865A (en) * 2021-11-18 2022-01-11 网易(杭州)网络有限公司 Data processing method, data processing apparatus, storage medium, and electronic apparatus
CN114357438A (en) * 2021-12-31 2022-04-15 杭州乒乓智能技术有限公司 Defense method, device, storage medium and server for cross-site scripting attack
CN114461964A (en) * 2022-01-30 2022-05-10 中国工商银行股份有限公司 Webpage skipping method and system

Similar Documents

Publication Publication Date Title
CN104301379A (en) A webpage cross-domain communication method and device
US11647096B2 (en) Method and apparatus for automatically optimizing the loading of images in a cloud-based proxy service
US9613156B2 (en) Cookie information sharing method and system
CN110209966B (en) Webpage refreshing method, webpage system and electronic equipment
US20150281262A1 (en) Multi-core browser and method for intercepting malicious network address in multi-core browser
CN108932332A (en) The loading method and device of static resource
CN106294648A (en) A kind of processing method and processing device for page access path
WO2017107620A1 (en) Method and system for loading page data
CN107807937B (en) Website SEO processing method, device and system
US20140280691A1 (en) Updating dynamic content in cached resources
CN104021172A (en) Advertisement filtering method and advertisement filtering device
CN102968584B (en) A kind of method and apparatus of log-on webpage
CN103631905A (en) Webpage loading method and browser
WO2020048189A1 (en) Image generation
US20170237823A1 (en) System and method for transforming online content
CN112637361B (en) Page proxy method, device, electronic equipment and storage medium
CN106897336A (en) Web page files sending method, webpage rendering intent and device, webpage rendering system
CN106599270B (en) Network data capturing method and crawler
CN105260421A (en) Webpage loading method and apparatus
CN104462571A (en) Webpage loading method and device and browser client-side
US20210064739A1 (en) Local secure rendering of web content
CN105183890A (en) Webpage loading method based on browser and browser device
WO2015179244A1 (en) Method and system for acquiring web pages
TW201804340A (en) Method and device for generating script
CN103902588A (en) Webpage access method and user terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20150121

RJ01 Rejection of invention patent application after publication