Skip to content
Browser internals·Beginner·Conceptual·1 min read

Does changing only the port count as a different origin?

Short interview answer

Yes. Origin is defined by scheme, host, and port together, so http://example.com:3000 and http://example.com:4000 are different origins even though the host is identical.

Key takeaway

Explain the underlying mental model clearly, then support it with a concrete example and its trade-offs.

← Back to Same-origin policy and CORS

Related questions