-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add appendix regarding different rendering methods #1525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The intro text explaining the key concepts will be very valuable for new users. The intro text reflects a bias towards SSR being generally superior. SSR is clearly superior / only choice for devices without modern JavaScript. On #1508 you wrote: 'Instead of making a single round trip over the internet to the backend server, you are more likely to have to make multiple round trips over the internet to render the page'. If the prerendered pages are already cached on the client, APIs have to do less work and transmits fewer bytes. So SSG+CSR wins. You say 'SSR is generally better for SEO' It is great that SvelteKit now allows per page SSG. The SSG style was critical for building our app as PWA, since the device may not be able to reach the SSR servers when needed. Pre-rendered pages are cached on device, app is mostly functional offline, and syncs with backend when connected. |
0959c33
to
c7e6e98
Compare
Not sure if it really matters unless it's being added in the text here, but even with GraphQL you'd probably still end up making more round trips than a traditionally SSR'd page: once to get the HTML, once to get the JS, once to make the API call
It's rare that you could cache the whole page such that you'd avoid API calls, but in the case that you could do this you could cache the page with any rendering solution so it's not a point in favor of one approach over another.
It would be basically equivalent to SSR, but I don't expect it'd necessarily be much better unless there's something I'm overlooking |
My observations (the submitted PR) were not theoretical, but based on happy results building a PWA with Svelte, designed to work offline. |
This is a lot of content to have before the 'getting started' block — the introduction should really be just that, people shouldn't have to scroll through multiple screens before they see I'd argue it's also a little confusing to have
so soon after
Perhaps it would make sense to have a separate 'terminology' or 'glossary' section at the end? |
Thanks for the review @Rich-Harris. I've updated it if you've got a chance to take another look |
|
This is one piece of background that a lot of new users seem not to have a good understanding of. While we assume a background in HTML, CSS, and Svelte some discussion of rendering might be warranted since SvelteKit at its core is a rendering engine. It helps explain what SvelteKit is, how it's unique, and the value it provides.
This closes #1508 which inspired this PR as a possible alternative way of covering this info. Also closes #1397