I have a page that uses URL params to look up in the database and return data to use on the page which is used in a repeat.
When the page first loads you can see the header, static body content, and footer. Once the data loads in it fills in page but that then shoves some of the static content and footer off screen.
That makes the page look bad as objects just pop in and move stuff around.
I looked into using bootstrap placeholders, but they are kind of finicky and don’t work great because they all need to be the same size but the content it is placeholding for can be different sizes based on the amount of text. Also had some issues where padding/margin on the placeholder stays after the conditional region is hidden.
I tried the pre-loader, and it worked fine on local but when I tried it on a live site it would show the page for a split second then show the pre loader and then the page again.
Also tried setting min heights to the containers that the data fills in, but it’s hard to get it right and the min heights would need to be different for desktop and mobile.
Is there any way to not show the page until the data is fetched?
Can I do anything with server-side rendering? I found this post and it is looking to do the same as me
“I want the project the work like a regular static (but DB-driven) Website - not an interactive, dynamic app.” Full Server Side Rendering in nodeJS
Or is it possible to do something like render a static version of the site? The data isn’t updated very often.
If anyone has any ideas on how to improve this, it would be appreciated.