Skip to main content
Apply for a Cheap Website
Website explainer · 1:47

CORS Explained: Browser Rules for Reading Responses from Another Origin

Why can a browser report a CORS error for an API request? CORS headers help determine whether a page can access a cross-origin response.

Jersey Web video: Can this page read that response?

1:47 · No narration: the video shows each step as text on screen, and every step is written out below, with buttons that jump the video to it.

Download the on-screen text track (VTT)

The six points in the video

This is a silent video. The headings, explanations and labels below reproduce the information on screen.

  1. Step 1: Identify the page origin

    The scheme, host and port determine an origin.

    On-screen labels: Scheme; Host; Port.

  2. Step 2: Compare the destination

    A different origin can require cross-origin access permission.

    On-screen labels: Page origin; Resource origin; Cross-origin request.

  3. Step 3: The browser checks access

    Browser rules restrict scripts reading responses across origins.

    On-screen labels: Frontend script; Browser enforcement; Response access.

  4. Step 4: The server supplies headers

    The resource server indicates which origins may access its response.

    On-screen labels: Response headers; Allowed origin; Relevant resource.

  5. Step 5: Some requests are preflighted

    The browser may first ask whether the intended method and headers are allowed.

    On-screen labels: Preflight request; Intended method; Intended headers.

  6. Step 6: Diagnose the exact exchange

    Review the error, origin and server configuration with the developer.

    On-screen labels: Browser error; Actual response; Intended access policy.

A practical check for your business

Check the actual browser origin and the API provider's permitted access configuration. CORS controls browser access to responses; it should not replace the server's authentication and permission checks.

Sources and further detail

Common questions

Why can a browser report a CORS error for an API request?

CORS headers help determine whether a page can access a cross-origin response. Investigate the actual origin and response rather than disabling browser protections.

Go further

Guide Read the practical guide More context for planning and maintaining your business website. 5 min read → Jargon Buster CORS explained Read the related Jargon Buster explanation. Read the explanation →

Investigate the actual origin and response rather than disabling browser protections.

Tell Jersey Web what your website needs to do and which part you want help with.

Talk to Jersey Web →

More video tips

All 205 videos →
Length 1:47 Website foundations

URL Percent Encoding Explained: Why Website Addresses Can Contain %20

URL encoding, explained.
Length 1:47 Business website checks

Restaurant Website Checklist: Help Guests Choose, Find and Book You

Restaurant and café website checks.
Length 1:47 Business website checks

Charity and Club Website Checklist: Help People Join In and Find Support

Charity and club website checks.