Add hacked proof-of-concept for "Missing content" message flash fix. #45
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an experiment to explore one strategy for addressing #42.
You can view this page to see the current prototype of SSR in
elm-pages
: https://5e226204a2ae6a0008328c65--elm-pages.netlify.com/blog/introducing-elm-pages/Note this doesn't technically do server-side rendering (SSR). Instead, it does the following:
This can give similar benefits, but it's not exactly the same.
In terms of having a page that can be crawled by search engines without running JavaScript, and other similar SEO benefits, it's just as good. Some experimentation and measurements still need to be done to understand what kinds of issues there may be when the pre-rendered DOM is replaced by the client-rendered DOM.
Issues with this approach, known and unknown (testing, measurements, and observations are very welcome!)
<img>
is overwritten in the DOM, it seems like it has a quick flash because of VirtualDom_virtualize causes flashes on <img> elm/virtual-dom#144Benefits that real SSR could provide
Current features
update
function during the pre-rendering stage. Instead, it just callsinit
so you will have control over what is presented in the pre-rendered view (and it is deterministic, rather than callingupdate
a variable number of times depending on how long pre-rendering takes).Possible experiments to try