This might seem obvious for a person, but it seems that computers might start contacting DNS servers, start working with IPv4 and IPv6, use DHCP settings, …, just for contacting themselves. When I launch multiple REST-API calls to my own computer (by surfing to http://localhost/Operation?Variable=Value), this causes quite some delay.
I’ve already tried adding a localhost entry to my /etc/hosts file (C:WindowsSystem32driversetchosts), but that translates localhost to the used entry (127.0.0.1 in this case), which causes again some network search to be done.
So, how can I tell my computer “If I surf to localhost, don’t even start networking: it’s about you!“)?
I’m working on Windows-11.
P.s. hereby the result of nslookup localhost:
nslookup localhost
Server: <some_server>.<domain>.local
Address: 10.132.xxx.yyy
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
*** Request to <some_server>.<domain>.local timed-out