Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

246
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!