Comment by BoppreH

1 day ago

With a better API we could have a progress bar that goes through the TCP/IP stack: advance when the domain is resolved, when a handshake is finished, when the request is sent, when the response starts streaming back, when the response finishes.

It'd be a very jumpy bar, but it helps develop intuitions. "The first part is always slower on this machine", "when it gets stuck on this spot I need to reset my router", "this part will be slow because the request is large", etc.

Perhaps an aside, but the things we do to compensate for the warts of TCP are staggering.

  • This isn't a TCP problem, though. It's a fetch API problem.

    Even if fetch ran over UDP, or a direct serial connection, or IP over Avian carrier, it'd still be a poor API that doesn't allow progress indication.