demo · v132

Saved Queries — per-page-load budget simulator

Each page-load has a 12-bit budget (4096 units) for sharedStorage.selectURL. Saved queries are charged once per page-load, then re-runs are free. Try calling the same query name twice.

budget used: 0 / 4096

the API

await sharedStorage.selectURL(
  "ad-slot-a",                       // savedQuery name
  [{url: "/a"}, {url: "/b"}, {url: "/c"}],
  { savedQuery: true }
);

see also