Cross-domain network resource request method and device for client

A technology for network resources and network resource addresses, applied in electrical components, transmission systems, etc., can solve the problems of cumbersome and low-efficiency cross-domain requesting network resources, and achieve the effect of fast and efficient access

CN104410711AInactive Publication Date: 2015-03-11BEIJING GRIDSUM TECH CO LTD
4 Cites 28 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Publication Date
2015-03-11
Estimated Expiration
Not applicable · inactive patent

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The invention discloses a cross-domain network resource request method and a cross-domain network resource request device for a client. The method comprises the following steps: receiving an asynchronous webpage request transmitted by the client with a first server, wherein the asynchronous webpage request carries a network resource address of a second server, and the first server and the client belong to a first domain; acquiring a server flag bit in the asynchronous webpage request; if the server flag bit indicates that the second server belongs to a second domain, extracting the network resource address and generating a network resource request by the first server, wherein the first domain is different from the second domain; forwarding the network resource request to the second server; transmitting the received response data of the second server to the client, wherein the response data carries the network resource corresponding to the network resource address. According to the method and the device, the problems that a cross-domain network resource request operation in the prior art is fussy and low in efficiency are solved; the effect of accessing cross-domain network resource quickly and efficiently by the client is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The present invention relates to the Internet field, in particular to a method and device for a client to request network resources across domains. Background technique

[0002] At present, the arrival of the second generation of Internet Web 2.0 has made AJAX technology widely used, and the core of AJAX technology is the JavaScript object XmlHttpRequest, which is a technology that supports asynchronous requests. Users can use JavaScript to make requests to the server and get Responsive, while not affecting the use of other users. However, in practice, AJAX technology interacts with data through XMLHttpRequest objects. When users need to access page content in other domains, browsers do not allow JS codes to perform cross-domain operations for security reasons. In view of the above problems, the current solutions are as follows:

[0003] Solution 1: JSONP method: use HTML script tags to load and execute other domain JavaScript files. Site B passes t...

Examples

Embodiment Construction

[0028] It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and examples.

[0029] In order to enable those skilled in the art to better understand the solutions of the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only It is an embodiment of a part of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present invention.

[0030] It should be noted that the terms "fir...