Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

202
Visualizações
Chrome dev tools (network tab) doesn't reflect aborted requests

I'm playing around with AbortController in order to cancel requests made with fetch. When I call abort() I do see my catch() handler being called (which means that the request was effectively canceled), but the request itself still retrieves the data from the endpoint (according to Chrome's network tab).

I was expecting the request to be aborted so that no download traffic would occur (assuming that the download of the actual data hasn't happened at the time the abort() is called).

Is this the expected behavior of AbortController?

As a side question: If "yes, that is the expected behavior, the request isn't aborted in a way to prevent download traffic", is there a way to actually abort a request made with fetch?

Edit: I'm testing https://fetch-abort-demo.glitch.me with Chrome and Safari, and while Safari does highlight with red the aborted request, Chrome doesn't. Maybe this is just a Chrome UI bug?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Yes, that is expected behaviour.

Say you say to me, give me all the nuts from that bag behind you.

I hand you all the nuts scoop by scoop in the bag you are having. Having been halfway finished emptying my bag into yours, you change your mind, drop the bag on the floor and walk away without saying a word.

Are there still nuts in what was once your bag? Yes, because it takes time to transfer data, and data is delivered in chunks/packets, piece by piece. Only when all the packets are transferred is the transmission complete.

Your request was aborted, but it had been in progress for a while getting packets. You just stopped requesting and accepting packets.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda