Page Variants: render the same template on both dead and live requests
leandrocp opened this issue · 0 comments
leandrocp commented
Refreshing a page with variants may result in flashing elements due to rendering different templates between the dead and live requests. Once a template is defined in the dead request it should reuse the same template when it upgrades to live.
A possible solution to this problem is using https://hexdocs.pm/live_cache/LiveCache.html
To reproduce this bug:
1 - create a new page
2 - create one or more variants for that page
3 - publish the page
4 - visit that page
5 - hard refresh that page multiple times
You'll notice that sometimes it first loads a variant and after a second or less it loads another one (the difference between the dead and live render)