Unlock instant, AI-driven research and patent intelligence for your innovation.

Method and device for cross-domain transfer of data

A data and cross-domain technology, which is applied in the field of data acquisition between web pages, can solve problems such as weak security, inability to meet the cross-domain transmission requirements of clients that cannot install flash plug-ins, and additional plug-in installations in browsers to ensure security Effect

Inactive Publication Date: 2013-08-14
TENCENT TECH (SHENZHEN) CO LTD
View PDF6 Cites 28 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0011] Since flash itself has a customizable security policy, its cross-domain function is relatively powerful and can meet general needs. The only shortcoming is that the browser needs to support flash plug-ins, which cannot meet the cross-domain transfer requirements of clients that cannot install flash plug-ins.
[0012] To sum up, the existing methods for realizing cross-domain transfer either have the problem of only transferring data between pages with the same parent domain name, or have the problem of weak security, or the amount of transferred data is limited by the length of the URL The impact of the problem, or there is a problem that requires the browser to install additional plug-ins

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for cross-domain transfer of data
  • Method and device for cross-domain transfer of data
  • Method and device for cross-domain transfer of data

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0032] Such as figure 1 As shown, a method for cross-domain data transfer provided by an embodiment of the present invention includes:

[0033] 101. Load the second page in the form of a subpage iframe tag on the first page, and store the data of the second page into the name attribute window.name of the subpage.

[0034] Wherein, the loading of the second page in the form of a subpage iframe tag in the first page is specifically: creating an iframe in the first page, the src attribute value of the iframe is the address of the second page, and passing through the iframe The second page is loaded.

[0035] It is worth noting that, during the process of loading the second page, the second page contains a script, wherein the following action exists in the script: an action of storing the data of the second page in the window.name of the iframe.

[0036] 102. After the loading is complete, the sub-page jumps to a proxy page, and the proxy page has the same origin as the first pa...

Embodiment 2

[0045] In order to enable those skilled in the art to better understand the method for data cross-domain transfer provided by the embodiment of the present invention, the method is now described in detail.

[0046] The characteristics of window.name make it very suitable for cross-domain transmission of large data. First, under the current tab, no matter how the URL of the page or subpage changes, window.name will exist and be stored in the browser without increasing HTTP number of requests. Second, in browsers that currently support JavaScript, window.name can store at least 2 megabytes of data (Mozilla Firefox, IE9, Google Chrome can store 32 megabytes or more). Plus, it doesn't require users to install any additional plug-ins on their browsers.

[0047] The basic principle of window.name cross-domain transfer data is that when the subpage iframe in the page loads the page, the value of window.name will persist. Therefore, when the iframe is redirected from the foreign doma...

Embodiment 3

[0063] Such as Figure 4 As shown, a device for cross-domain data transfer provided by an embodiment of the present invention includes:

[0064] The execution unit 41 is used to load the second page in the form of a subpage iframe tag in the first page, and store the data of the second page into the name attribute window.name of the subpage;

[0065] In this example, if Figure 5 As shown, the execution unit includes:

[0066] Creating a subunit 411 for creating a subpage iframe in the first page, the source src attribute value of the subpage is the address of the second page;

[0067] The loading subunit 412 is configured to load a second page through the subpage, and store the data of the second page into window.name of the subpage according to the script in the second page.

[0068] A jumping unit 42, configured to jump the subpage to a proxy page after the execution unit is loaded, and the proxy page has the same source as the first page;

[0069] The obtaining unit 43...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method and a device for cross-domain transfer of data and relates to the technical field of acquisition of data among web pages. By the aid of the method and the device, the cross-domain transfer of the big data is achieved. The method for cross-domain transfer of the data comprises that a second page is loaded in the form of a subpage iframe tag in a first page, and data of the second page are stored into a name attribute window.name of a subpage; after loading is finished, the subpage jumps to a proxy page, wherein the proxy page and the first page are congenetic; and the first page obtains the data of the second page through the window.name of the proxy page. The method and the device for cross-domain transfer of the data can be applied to cross-domain transfer among web pages.

Description

technical field [0001] The present invention relates to the technical field of data acquisition between web pages, in particular to a method and device for cross-domain data transfer. Background technique [0002] For security reasons, Netscape Communications proposed the browser's same-origin policy, which prevents documents or scripts loaded from one source from accessing properties of documents loaded from another source. Currently, browsers that support JavaScript generally use this strategy, but the price of enhancing security is sacrificing the convenience of transferring data from different sources (that is, cross-domain transfer). [0003] Currently, cross-domain delivery is mainly achieved through the following methods: [0004] (1) Use document.domain to achieve: [0005] Take www.domain1.com / index.htm and a.domain1.com / index.htm as an example, if you modify the domain attribute value of the document on the two pages to "domain1.com", then the same-origin policy ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F17/30
Inventor 操龙敏于树南郑旭泽方应杭龙丁奋郭学亨朱磊
Owner TENCENT TECH (SHENZHEN) CO LTD