Cross-domain resource caching method and system, server and storage medium

A caching server and resource caching technology, applied in the field of realizing cross-domain resource caching, can solve problems such as video playback and other services that cannot be used normally, affect user perception and experience, and achieve the effect of easy technology and less adjustment

Pending Publication Date: 2021-01-19
CHINA MOBILE GROUP ZHEJIANG +1
View PDF6 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Otherwise, WebCache cache encounters browser cross-domain access prohibition, which will cause services such as video playback to fail to work normally, affecting user perception and experience

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
  • Cross-domain resource caching method and system, server and storage medium
  • Cross-domain resource caching method and system, server and storage medium
  • Cross-domain resource caching method and system, server and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0041] Such as figure 1As shown, a method for implementing cross-domain resource caching disclosed in the embodiment includes the following steps:

[0042] S11: Check whether the HTTP request header contains the origin field of the cross-domain request flag;

[0043] Specifically, the WebCache cache monitoring subsystem first checks whether the HTTP request header contains a cross-domain request flag Origin field; the origin is a URI that tells the server where the request comes from. It does not contain any path information, just the server name . In particular, the value of Origin can be an empty string. It is worth noting that not only cross-domain requests, but ordinary requests also carry Origin header information.

[0044] S12: If there is no Origin field, or the cross-domain request is not allowed, it will be treated as a normal HTTP request;

[0045] In this step, if there is no Origin field in the step, or the cross-domain request is not allowed, it is treated as a...

Embodiment 2

[0064] Figure 4 is another optical cable pipeline data analysis system shown in an exemplary embodiment of the present invention, such as Figure 4 shown, including:

[0065] The request module 41 is used to check whether the HTTP request header contains the origin field of the cross-domain request flag;

[0066] Judgment module 42, if there is no Origin field, or the cross-domain request is not allowed, it will be treated as a normal HTTP request;

[0067] If there is an Origin field and cross-domain requests are allowed, check whether it is a pre-request;

[0068] If it is not pre-requested, the WebCache server will automatically set the parameters allowing verification of cross-domain domain names; Access-Control-Allow-Origin, after WebCache and the browser's request response negotiation and verification pass, it will directly return the accessed resource content;

[0069] The pre-request verification module 43 is used for if it is a pre-request, the browser first sends...

Embodiment 3

[0079] Figure 5 A schematic structural diagram of a server according to Embodiment 3 of the present invention is shown, as shown in Figure 5 As shown, the terminal may include: a processor (processor) 502 , a communication interface (Communications Interface) 504 , a memory (memory) 506 , and a communication bus 508 .

[0080] in:

[0081] The processor 502 , the communication interface 504 , and the memory 506 communicate with each other through the communication bus 508 .

[0082] The communication interface 504 is configured to communicate with network elements of other devices such as clients or other servers.

[0083] The processor 502 is configured to execute the program 510, specifically, may execute relevant steps in the above-mentioned embodiment of the method for implementing cross-domain resource caching.

[0084] Specifically, the program 510 may include program codes including computer operation instructions.

[0085] The processor 502 may be a central proce...

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 cross-domain resource caching method and system, a server and a storage medium. The method comprises the steps: judging whether a caching strategy is hit or not through analyzing an HTTP request and Header information corresponding to a response header, and automatically adding an AccesControl AllowOrigin flag bit in response according to whether a resource terminal request contains a cross-domain request flag bit Origin field or not, wherein the problem that the WebCache cannot cache the cross-domain access request resources is solved, and that the WebCache system supports continuous caching and service of the cross-domain access request resources is ensured. According to the method, the network architecture does not need to be adjusted, the WebCache processing flow is slightly adjusted, and the method is technically easy to implement.

Description

technical field [0001] The present invention relates to the technical field of mobile communication, in particular to a method, system, server and storage medium for realizing cross-domain resource caching. Background technique [0002] With the rapid development of Internet services, browsers, as the main carrier for terminals to browse the Internet and watch videos, have become the main target of illegal intrusion and malicious attacks. For security reasons, browsers restrict cross-origin HTTP requests initiated from scripts. The default security restriction is the same-origin policy (same-origin policy), that is, JavaScript or cookies can only access content under the same domain. When users access Internet resources through a browser, the browser security mechanism requires the resource protocol, domain name, port and The source site must be consistent for normal access. While these restrictions are necessary, they do cause a lot of inconvenience, and legitimate uses a...

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 Applications(China)
IPC IPC(8): H04L29/08H04L29/06
CPCH04L67/02H04L69/22H04L63/10H04L67/568
Inventor 徐舟程路王易风余海江舒继峰罗琪
Owner CHINA MOBILE GROUP ZHEJIANG
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products