DEV Community

Discussion on: Vue + Relay + Server Side Rendering (SSR)

oguimbal profile image
Olivier Guimbal • Edited on

Right, but pre-rendering is hard when you have user data (ex: a public personal profile). But anyway, is there much difference between pre-rendering and SSR with a cache ?
For instance, when running your SSR on lambda@edge, cloudfront can cache the results, which makes further requests kind-of pre-rendered, isnt it ?

By the way, to mention my comment on your other article: I precisely used Cloudflare Workers to do just that (and for their <10ms cold startup time). They make it really easy to tweak caching via their distributed key-value store which you can access from your edge locations => That's way more powerful compared to a cloudfront cache you cannot control. I'll post an article about that when I have time to spare.

Thread Thread
divporter profile image
David Porter Author

I use pre-rendering to render the shell of the app (nav, footer, background etc) for a rapid first paint. It's much easier to set up. But you're spot on, with caching the actual SSR won't happen that often. I only do full SSR for SEO, regular users get the pre-rendered shell.