Svelte · Middle · Question 34 of 75
Why use the fetch passed to load instead of the global one?
- ✓Correct answer: It forwards cookies on the server, supports relative URLs and inlines responses into the HTML so the browser doesn't refetch during hydration
- 2The global
fetchis not available in SvelteKit - 3It's faster because it skips the network always
Explanation
Requests to your own +server.js endpoints during SSR even call the handler directly without HTTP.