Check patentability & draft patents in minutes with Patsnap Eureka AI!

A method and device for cross-browser data interaction based on browser protocol

A cross-browser, data interaction technology, applied in the Internet field, can solve the problem that controls cannot be used at the same time, achieve the effect of solving the problem of cross-browser use of controls and improving development efficiency

Active Publication Date: 2020-05-19
SHANDONG WELL DATA CO LTD
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The purpose of the present invention is to solve the problem that browsers use different development languages ​​for control development, and the same control cannot be used on different browsers at the same time, and provide a cross-browser data interaction method and device based on browser protocol

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
  • A method and device for cross-browser data interaction based on browser protocol
  • A method and device for cross-browser data interaction based on browser protocol
  • A method and device for cross-browser data interaction based on browser protocol

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0028] figure 1 It is a schematic diagram of the cross-browser data interaction method based on the browser protocol in the first embodiment of the present invention, a control solution that can realize cross-browser use.

[0029] Specifically, a browser protocol-based cross-browser data interaction method includes:

[0030] Step 1, the user terminal browser utilizes the JavaScript module to execute and call the local application program command according to the browser protocol;

[0031] Step 2. The local application creates a Webserver, and performs local simulation interaction with the Webserver through JavaScript;

[0032] Step 3. Call the JavaScript script file of the public server, dynamically add the JavaScript script file, further use the JavaScript module in the DOM to send cross-domain data, and the size of the single sent data does not exceed 2KB; further use the Get class request to find the header file; use The Create statement creates a JavaScript object;

[0...

Embodiment 2

[0037] like figure 2 As shown in , examples of the code fields involved in cross-domain data transmission are as follows:

[0038] " / / Find the document header

[0039] var head = document.getElementsByTagName('head')[0];

[0040] / / Generate a JS object

[0041] var jscript = document.createElement('script');

[0042] jscript.type = 'text / javascript';

[0043] / / send data

[0044] jscript.src="http: / / 127.0.0.1:"+jlink_port+" / "+"sent data";

[0045] / / Insert elements (insertBefore must be compatible with IE6)

[0046] head.insertBefore(jscript, head.firstChild);"

Embodiment 3

[0048] like image 3 As shown, the data callback and anti-reentrancy code examples are as follows:

[0049]

[0050] Example: 4:

[0051] like Figure 4 As shown, corresponding to the above method, the present invention also provides a cross-browser data interaction device 1 based on the browser protocol, including:

[0052] An application calling module 101, configured to call a local application;

[0053] The simulation interaction module 102 is used for local application programs to create a Webserver, and to perform local simulation interaction through JavaScript;

[0054] A cross-domain data sending module 103, configured to use the JavaScript module in the DOM to send cross-domain data;

[0055] The callback module 105 is configured to call back the returned data.

[0056] The data re-entry prohibiting module 104 is configured to prevent data re-entry.

[0057] The data fetching module 106 is used to fetch the returned data variables.

[0058] The device furthe...

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 relates to a cross-browser data interaction method and a cross-browser data interaction device on the basis of browser protocols. The cross-browser data interaction method includes steps of 1, allowing browsers of user terminals to execute local application program calling commands by the aid of JavaScript modules according to the browser protocols; 2, creating a Webserver by the aid of local application programs and carrying out local simulation interaction; 3, calling JavaScript script files of public servers, dynamically adding the JavaScript script files and carrying out cross-domain data transmission; 4, setting callback functions on control components of Webserver sides after data are completely transmitted and further loading callback instructions to carry out data callback; 5, storing the data after callback is completely carried out, deleting callback quotation, assigning variables and directly returning the data by the aid of the variables during callback. The cross-browser data interaction method and the cross-browser data interaction device have the advantages that cross-browser interaction can be carried out on the data, and accordingly the development efficiency can be improved.

Description

technical field [0001] The invention relates to a browser protocol-based cross-browser data interaction method and device, belonging to the technical field of the Internet. Background technique [0002] The URL Protocol protocol, also known as the browser protocol, is a common protocol used by browsers. It is usually used to call some external applications, such as: downloading from Thunder, calling Aliwangwang or QQ for customer service, etc. Since the browser protocol can only be one-way one-time interaction, the application can only be called once, and there is no return value. After the call, the page cannot interact with external applications, so it has been only doing some simple applications. [0003] A control is an encapsulation of data and methods, and has its own properties and methods. Properties are simple visitors to control data, and methods are some simple and visible functions of the control. Due to the diversity of web applications, many applications need ...

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
Patent Type & Authority Patents(China)
IPC IPC(8): H04L29/06H04L29/08
CPCH04L67/02H04L69/08
Inventor 孙晓悦
Owner SHANDONG WELL DATA CO LTD
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More