Question · JavaScript and React course · Module 11: Data Fetching and APIs
Stale-While-Revalidate Pattern
What does the name of the 'Stale-While-Revalidate' (SWR) pattern mean?
Answer options
- Show cached data immediately (even if outdated), while simultaneously fetching fresh data from the server in the background
- Delete old data from cache and wait for fresh data from the server
- Fetch data only when the cache is empty, otherwise always use cache
- Validate data on the server before displaying it to the user
You can check the correct answer by solving this task in the CodeWorlds game.