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

248
Visualizações
Javascript `fetch`-API, how to use http-header `Range` without `If-Range`

Javascript Code:

const resp = await fetch(path, {
    headers: {
      'range': `bytes=${from}-${to}`
    },
    cache: 'force-cache'
  });

Chrome adds the If-Range header (sometimes):

If-Range: "76648e655156d81:0"
Range: bytes=434176-438271

The If-Range HTTP request header makes a range request conditional: if the condition is fulfilled, the range request is issued, and the server sends back a 206 Partial Content answer with the appropriate body. If the condition is not fulfilled, the full resource is sent back with a 200 OK status.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Range

This behaviour is very problematic for me.

How can I ensure a "Partial Content" ? Or how can I remove this If-Range-Header?

about 4 years ago · Juan Pablo Isaza
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