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

141
Views
Make browser use local file instead of received network file

I'm looking for a feature like local override, but I need it to work without developer tools open. I want to load a local file instead of the file from the server, or just execute some JS on the web file BEFORE render. Can I achieve this with injected JS?

almost 4 years ago · Santiago Trujillo
1 answers
Answer question

0

You can use a service worker to intercept a specific network request for a resource and respond with whatever you want instead (a cached copy of your local file or a live response from a local server you're also running). From the linked page (emphasis mine):

A service worker is an event-driven worker registered against an origin and a path. It takes the form of a JavaScript file that can control the web-page/site that it is associated with, intercepting and modifying navigation and resource requests, and caching resources in a very granular fashion to give you complete control over how your app behaves in certain situations (the most obvious one being when the network is not available).

almost 4 years ago · Santiago Trujillo 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!