Our great sponsors
-
snowflake
Discontinued Snowflake is a network service for generating unique ID numbers at high scale with some simple guarantees.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Two URLs have a different origin if any of those things are different. So https://developer.mozilla.org and https://www.mozilla.org do not have the same origin- while the scheme and the port are the same, and they share the mozilla.org domain name, they have different subdomains so the full hostname is different.
If you run that and then look in your Network tab again, you'll see that the response includes a header that says Access-Control-Allow-Origin: *. The * means that this image is allowed to be requested from any origin whatsoever- this is presumably because the NYT want this image to show up in social media shares. This could also be restricted- for example, if for some reason they only wanted the image to be allowed to be requested from Twitter, they could send a header that said Access-Control-Allow-Origin: https://twitter.com.
Two URLs have a different origin if any of those things are different. So https://developer.mozilla.org and https://www.mozilla.org do not have the same origin- while the scheme and the port are the same, and they share the mozilla.org domain name, they have different subdomains so the full hostname is different.