Thanks Eduardo Celedonio 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 :)
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."
thanks for sharing, i learnt something new😊
So well explained that it is difficult not to understand. Congratulations! Continue with articles like that.
so we all face that cors error at some point in our learning journey. Thanks for this nice explanation.
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&)
})()
Eduardo Celedonio
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("");