Slow Page Load
Answered
Yellowstripe scad posted this in #help-forum
Yellowstripe scadOP
Hi guys,
I am experiencing some slow load page, on my local environment when switching between pages.
This is obviously because of SSR, and the page is firstly fetched and data from the DB is fetched and then the HTML is generated.
Is there a way to show a client sided component as a preloading component? Whether that be a loader, or a spinner animation or anything like this? There is no feedback to the user to suggest that they have switched pages after clicking a link, as the page holds for 3-4 seconds, until the redirected page is ready.
I am experiencing some slow load page, on my local environment when switching between pages.
This is obviously because of SSR, and the page is firstly fetched and data from the DB is fetched and then the HTML is generated.
Is there a way to show a client sided component as a preloading component? Whether that be a loader, or a spinner animation or anything like this? There is no feedback to the user to suggest that they have switched pages after clicking a link, as the page holds for 3-4 seconds, until the redirected page is ready.
Answered by Asian black bear
Local speeds are not representative of speeds in production because locally the files are compiled on request. If you want loading indicators use suspense boundaries or the loading.tsx file.
3 Replies
Asian black bear
Local speeds are not representative of speeds in production because locally the files are compiled on request. If you want loading indicators use suspense boundaries or the loading.tsx file.
Answer
@Asian black bear Local speeds are not representative of speeds in production because locally the files are compiled on request. If you want loading indicators use suspense boundaries or the loading.tsx file.
Yellowstripe scadOP
Completly forgot of the existance of loading.txt 

Thank you