---
title: "Discussion on \"Introduction to Cross Origin Resource Sharing (CORS)\" | Hashnode"
description: "Discussion on \"Introduction to Cross Origin Resource Sharing (CORS)\". In web development practice, it is common for web apps to separate their front-end from back-end services. As such, accessing resources from the back-end requires the understanding of Cross-Origin Resource Sharing or CORS for short. It is an essentia..."
url: "https://hashnode.com/posts/introduction-to-cross-origin-resource-sharing-cors/5f87c87bc5c9ff500d6cbb34"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Introduction to Cross Origin Resource Sharing (CORS)](https://blog.lo-victoria.com/introduction-to-cross-origin-resource-sharing-cors?utm_source=hashnode&utm_medium=feed)

In web development practice, it is common for web apps to separate their front-end from back-end services. As such, accessing resources from the back-end requires the understanding of Cross-Origin Resource Sharing or CORS for short. It is an essentia...

Oct 15, 2020 · 3 min read · blog.lo-victoria.com  
Updated Aug 13, 2025  
Read the article

-   [#cors](https://hashnode.com/tag/cors)
-   [#networking](https://hashnode.com/tag/networking)
-   [#beginners](https://hashnode.com/tag/beginners)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#tutorial](https://hashnode.com/tag/tutorial)

## Written by

[Victoria Lo](https://hashnode.com/@victoria)

@victoria · Singapore

  
[View profile](https://hashnode.com/@victoria)

A nerd in books, tea, games and software.

I'm a solutions engineer lead, GitHub Star, Director of WomenDevsSG, and co founder of ragTech. I work at the intersection of tech, systems, and leadership, and this blog is where I share my journey through all three. Expect honest reflections, real experiences, and thoughts that are still forming rather than polished career advice.

## Responses 8

Markdown supported · ⌘↵ to post

[Eduardo Celedonio](https://hashnode.com/@laloceledonio)

[Aug 12, 2025](https://hashnode.com/posts/introduction-to-cross-origin-resource-sharing-cors/5f87c87bc5c9ff500d6cbb34/comment/689b597a7cd00212e6b918af)

Thanks for sharing! Your explanation makes everything really easy to follow. I just noticed that in the "First, an experiment" section, you might be missing the closing part for this line: const response = await fetch("");

[Victoria Lo](https://hashnode.com/@victoria)

[Aug 13, 2025](https://hashnode.com/posts/introduction-to-cross-origin-resource-sharing-cors/5f87c87bc5c9ff500d6cbb34/comment/689b597a7cd00212e6b918af#reply-689c93e86133c71f4130e8f4)

Thanks [Eduardo Celedonio](https://hashnode.com/@laloceledonio) for finding the article useful and pointing out the small typo! I have fixed it, can't believe it took 5 years since this article is published for someone with a good eye to notice haha :)

[Phuc Tran](https://hashnode.com/@phucxp12vn)

[Apr 26, 2024](https://hashnode.com/posts/introduction-to-cross-origin-resource-sharing-cors/5f87c87bc5c9ff500d6cbb34/comment/662bc1940d05f6279e92fc13)

Great explained. Thank you.

But, in this sentence "The whitelisted website is usually passed in the Access-Control-Allow-Origin request header, which will tell the server that it is okay to send and share its data to this website."

I believe you meant to say "Access-Control-Allow-Origin response header" instead of "Access-Control-Allow-Origin request header."

[Victoria Lo](https://hashnode.com/@victoria)

[May 1, 2024](https://hashnode.com/posts/introduction-to-cross-origin-resource-sharing-cors/5f87c87bc5c9ff500d6cbb34/comment/662bc1940d05f6279e92fc13#reply-6631c7eed3f885c59c4482f0)

Thank you catching that! I will make the correction 🙏

[Abiola](https://hashnode.com/@AbiolaFarounbi)

[Oct 15, 2020](https://hashnode.com/posts/introduction-to-cross-origin-resource-sharing-cors/5f87c87bc5c9ff500d6cbb34/comment/5f88d9a8d7dc0b17a97a17ed)

thanks for sharing, i learnt something new😊

[Victoria Lo](https://hashnode.com/@victoria)

[Oct 16, 2020](https://hashnode.com/posts/introduction-to-cross-origin-resource-sharing-cors/5f87c87bc5c9ff500d6cbb34/comment/5f88d9a8d7dc0b17a97a17ed#reply-5f89039e6eb39417ce5e48d1)

My pleasure :)

[Martins Gouveia](https://hashnode.com/@martins)

[Oct 15, 2020](https://hashnode.com/posts/introduction-to-cross-origin-resource-sharing-cors/5f87c87bc5c9ff500d6cbb34/comment/5f8849586eb39417ce5e40f8)

So well explained that it is difficult not to understand. Congratulations! Continue with articles like that.

[Victoria Lo](https://hashnode.com/@victoria)

[Oct 15, 2020](https://hashnode.com/posts/introduction-to-cross-origin-resource-sharing-cors/5f87c87bc5c9ff500d6cbb34/comment/5f8849586eb39417ce5e40f8#reply-5f88d0a1d7dc0b17a97a179b)

Thanks for the support :)

[Rutik Wankhade](https://hashnode.com/@rutikwankhade)

[Oct 15, 2020](https://hashnode.com/posts/introduction-to-cross-origin-resource-sharing-cors/5f87c87bc5c9ff500d6cbb34/comment/5f8807fc4aeeb354354ed2f3)

so we all face that cors error at some point in our learning journey. Thanks for this nice explanation.

[Victoria Lo](https://hashnode.com/@victoria)

[Oct 15, 2020](https://hashnode.com/posts/introduction-to-cross-origin-resource-sharing-cors/5f87c87bc5c9ff500d6cbb34/comment/5f8807fc4aeeb354354ed2f3#reply-5f88d0b0d7dc0b17a97a17a0)

You're welcome! Thanks for reading!

[mrcbns](https://hashnode.com/@mrcbns)

[Oct 15, 2020](https://hashnode.com/posts/introduction-to-cross-origin-resource-sharing-cors/5f87c87bc5c9ff500d6cbb34/comment/5f87fb5b4aeeb354354ed1e5)

Why can you _await fetch_ whithout async first, which requires the use of immediately Invoked Function Expression? for example:

```
(async () => {
    const response = await fetch('url&)
})()
```

[Victoria Lo](https://hashnode.com/@victoria)

[Oct 15, 2020](https://hashnode.com/posts/introduction-to-cross-origin-resource-sharing-cors/5f87c87bc5c9ff500d6cbb34/comment/5f87fb5b4aeeb354354ed1e5#reply-5f88d32cd7dc0b17a97a17c5)

Good question. CORS is server-side whereas fetching is from the client-side. CORS determines whether or not you are allowed to fetch from "[url".](https://url"./)

[Rahul](https://hashnode.com/@RAHULISM)

[Oct 15, 2020](https://hashnode.com/posts/introduction-to-cross-origin-resource-sharing-cors/5f87c87bc5c9ff500d6cbb34/comment/5f87cb57c5c9ff500d6cbba2)

Just realized what was missing from my road map. Thanks for explaining.

[Richard Harris](https://hashnode.com/@richard788)

[Oct 15, 2020](https://hashnode.com/posts/introduction-to-cross-origin-resource-sharing-cors/5f87c87bc5c9ff500d6cbb34/comment/5f87c943c5c9ff500d6cbb62)

Well explained. Thanks!
