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

362
Views
What is the header value used in NavigationPreloadManager for?

Question I've read the docs below but couldn't find the reason for using the "setHeaderValue" function?

navigator.serviceWorker.ready.then(registration => {
  return registration.navigationPreload.setHeaderValue(newValue);
}).then(() => {
  console.log('Done!');
});

Reference

  1. ServiceWorker Document in W3C
  2. NavigationPreloadManager Document in MDN
  3. Navigation Preload Example
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I'm assuming you're already familiar with service worker navigation preloads.

To allow servers to differentiate between regular requests and navigation preload requests, browsers use the Service-Worker-Navigation-Preload header. By default, the value of this header is true, and setHeaderValue(value) allows you to override true with something else. This article explains it in more detail.

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