Rate Limited Fetch Service Worker

This intercepts requests (currently to devnet.solana.com) and tries to enforce a 100ms delay between them, so that they do not get rate limited.

You can toggle whether or not it's running in the Application tab of the browser.

network tab

How it works

First half of video, click to load 100 RPC requests synchronously and a bunch fail due to CORS. Second half, the serviceworker is enabled, it intercepts the requests and adds a varying delay which limits them to approx 10 per second, resulting in no failures.

Kapture.2021-05-03.at.13.47.02.mp4