4 ms·
If all first time users see the same thing, why not serve a precompiled static html that then gets taken over by React. Isn’t that the whole point?
by Swizec 9y ago
If all first time users see the same thing, why not serve a precompiled static html that then gets taken over by React.
Isn’t that the whole point?
- wickedlogic 9y agoSo very much this. Particularly if you dont have enough context to be personalized, pre-compiled popular segments are a reasonable approach.
- abritinthebay 9y ago> If all first time users see the same thing That's a big, important, if.
- _greim_ 9y agoIt's good odds, though. Obviously depending on the app, these would be non-logged-in users who don't get personalized content.
- abritinthebay 9y agoThere can be (though you’d be surprised- there’s rarely such a thing as a non-identifiable user nowadays). Just pointing out it’s a very big conditional. For example: I work at Bleacher Report and our non-logged-in users get data customized for them. That can be as simple as GeoIP data or can be us knowing (and inferring) what articles or content they’ve seen. The permutations are quite large. Now some blog, or a very simple app won’t do something like that (hell, they might not have the depth of content to be able to) but it’s reasonbly common to have that requirement on large sites outside of v.limited pages (like login/signup etc)
- dceddia 9y agoAnd if only a few things need to be customized, skeleton states can help bridge the gap. https://css-tricks.com/building-skeleton-screens-css-custom-properties/ https://css-tricks.com/building-skeleton-screens-css-custom-...
- _greim_ 9y agoYes, that's exactly what React SSR + caching accomplishes!