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

274
Views
Response codes for static(js,css,images etc) resource files programmatically in js?

I've been trying to log the resources that are not getting success status codes (i.e 3xx,4xx & 5xx) in browser without depending on server's access logs. I came across performance.getEntries() , but it gives status codes only for http calls(XMLHttpRequest & Fetch) .

I also had tried instrumenting fetch in service workers , it worked but resulted in duplicate network calls being triggered ,

// Listen to fetch events
self.addEventListener('fetch', function(event) {
  var promise = fetch(event.request.url);
  event.respondWith(promise);
  promise.then(function(data){
      console.log(data);
  })
}); 

enter image description here

Is there any way to instrument|intercept the browser requests for these resource files ?

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!