Home / Guides

How to test your local JavaScript on the live site

Sometimes a bug only shows up on the real site, with real data. Instead of deploying to test a fix, you can make Chrome load your local build in place of the production file, or replace a file's contents entirely. This used to be Resource Override's job; ProperHeader does it on Manifest V3.

By RJ Macarthy · 3 November 2026

Both methods below are Pro features.

Option 1: redirect the file to your dev server

Best when you have a dev server running, because your changes show up on reload.

  1. Open Full editor and click Prod JS → localhost under Quick start, or add a row under Redirects.
  2. Set From to the production file, for example https://cdn.example.com/app.js.
  3. Set To to your local file, for example http://localhost:8080/app.js.
  4. Reload the production page. Chrome now loads your local build.

Redirect a whole folder with regex

Switch the match type to regex and use a capture group:

From: ^https://cdn\.example\.com/(.*\.js)$
To:   http://localhost:8080/$1

Every script under the CDN is now loaded from the same path on your dev server.

Option 2: replace the file's contents

Best for a quick experiment, or for mocking an API response without a server.

  1. Under File overrides, click + Add.
  2. Enter the file URL, for example https://example.com/static/app.js, and choose the type: JavaScript, CSS, JSON, text or HTML.
  3. Paste your replacement contents.
  4. Reload the page.

The Mock an API response recipe does this for a JSON endpoint, which is handy when the back end isn't built yet.

If the override doesn't load

Questions

Is there a Resource Override alternative for Manifest V3?

Yes. ProperHeader's File overrides and Redirects cover the same jobs: replace a file's contents, or send a production file to your local server.

Can I override a JSON API response in Chrome?

Yes. Add a File override for the endpoint URL, choose JSON, and paste the response body. It's returned with HTTP 200 and a JSON Content-Type.

Why is my overridden script blocked?

Usually the page's Content-Security-Policy forbids data: URLs. Fill in 'Remove CSP on' for that page. Subresource-integrity hashes and service-worker caches can also stop an override.