How to prevent content flashing before authentication check in frontend applications? Answered
When we hide gated/login only content, it appears for a split second while the page loads to anyone. Then disappears. Anyway around this?
When we hide gated/login only content, it appears for a split second while the page loads to anyone. Then disappears. Anyway around this?
Comments
3 comments
You can add a loader for x amount of seconds to Make sure Memberstack has loaded before displaying information.
Memberstack created a memberscript for these cases https://www.memberstack.com/scripts/23-skeleton-screens-content-loaders
You can also use data-ms-bind:style attributes to change the display state of elements. That way they can be default hidden and then Memberstack will only display them if the member has access. https://docs.memberstack.com/hc/en-us/articles/16015762458011-data-ms-bind-style
Raquel Lopez thank you 🙏 we'll check this out
Thank you Duncan Hamra!
Please sign in to leave a comment.