Contents

About CORS(3)

   Jun 14, 2023     0 min read

This is an article about Cross-Origin Resource Sharing (CORS).

The provenance comparison process

Letโ€™s continue with the details of where and how requests are made, responses are received, and comparisons are made. Letโ€™s explain it through characters and pictures.

Characters
  1. The client (user or device) sends a request to the browser. This request can be generated on the client side via JavaScript code, HTML form, etc.
  2. The browser takes the request from the client and sends a request to the web server based on that request. This request is sent to the web server using the HTTP protocol.
  3. The web server processes the request it receives and generates a response to the client. The response is organized in a format that follows the HTTP protocol and can include data or status codes.
  4. The browser accepts the response from the web server.
  5. The browser compares the origin of the response with the origin of the current page. If the origin is the same, the browser displays the response. This can mean displaying the content of the web page, images, scripts, etc.
Illustration

CORS Structure