Twelve requests on the home page
Your home page is mostly text and a sign-up button. The shows twelve calls before it finishes loading, some of them failing.
This answers: Why does my page make so many API calls? No coding needed. 3 quick decisions.
- How a request travels
- Costs and abuse
- Debugging without panic
Checking your access…
Why does my page make so many API calls?
Often a shared layout or global provider fetches data for every page, so even a simple home page loads user details, notifications, orders and admin stats it never shows, and several components request the same data separately. Fetch data in the page or component that displays it, when it is displayed, and share one request instead of repeating it.
Breaks at Browser: Every page fetches every page's data
How it works
- /index.html200
- /api/me401
- /api/notifications401
- /api/orders?all=true401
- /api/admin/stats403
- /api/products200
- /api/products (again)200
- /api/products (again)200
8 requests · page ready after 780 ms
Why AI tools write this bug
It is simplest to load everything in one provider at the top of the app, so generated code often does exactly that, and each new component adds its own fetch.
How to fix it
- Open the on each important page.
3 more steps, and a prompt that checks your own app for this bug. Part of Pro.
UnlockCommon questions
- Are lots of requests always bad?
- No. Requests for what the page shows are fine. Failing, duplicated or unused requests are pure waste.