The port is part of security identity
http://localhost:3000 and http://localhost:5173 are different origins even on the same computer.
Interactive URL anatomy
See exactly what a local URL means to the browser—and which parts affect the network request, origin, route, and page state.
URLs are parsed by your browser and are not requested or uploaded.
http://localhost:3000 and http://localhost:5173 are different origins even on the same computer.
The server receives the path and query string, but the #fragment is handled by the browser and client-side code.
Applications bind to 0.0.0.0 to listen on IPv4 interfaces. Clients should normally use localhost, 127.0.0.1, or a real interface address.
Parsing follows the browser URL model documented in the WHATWG URL Standard.