Skip to content

Commit 220c522

Browse files
committed
docs: explain why not to fetch lazy loaded data server side
1 parent ce62915 commit 220c522

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/content/guides/6.best-practices/2.data-fetching.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ Animation below visualizes the difference between server and client side fetchin
2929

3030
The rule of thumb is: _always use server-side fetching except for_:
3131

32-
- **lazy loaded data** - data that is not visible immediately on page load. For example:
32+
- **lazy loaded data** - data that is not visible immediately on page load and can be removed from server-side rendered html to reduce its size. For example:
3333
- product reviews should appear only when user clicks expand on the “reviews accordion”
3434
- content below the fold is fetched on scroll
3535

36-
- **personalized data** - data that is different for each user or group. Fetching such data server side would not only cause flickering but also might cause problem with caching (read more about caching). For example:
36+
- **personalized data** - data that is different for each user or group. Fetching such data server side would not only cause flickering but also might cause problem with caching ([read more about caching](/storefront/features/cdn/making-ssr-cacheable)). For example:
3737
- pricing data might be different for each customer group
3838
- product recommendations are based on individual user’s journey
3939
- cart content is specific for each user

0 commit comments

Comments
 (0)