DEV Community

Discussion on: How does dev.to achieve SSR?

Collapse
 
rhymes profile image
rhymes • Edited

It doesn't, not in the sense you probably mean, because it's not a SPA :)

Most of the website is rendered by classic server side templates which spit out HTML, templates which spit out CSS and JavaScript is added on top of it. Like a regular website. Some pages contain Preact components but they are used as augmentation or as main functionality, but they don't control the whole page.

There are some tricks to make it faster like preloading links (so you don't need client side routing) and edge caching but if you'd turn them off you'd be left with a functioning website, albeit a little bit slower.

Collapse
 
waracci profile image
Morris Warachi

Thanks for the reply @rhymes , it makes it clearer for me. The part I did not know about dev.to is that it is not an SPA.
As for the preloading, I remember reading Ben Halpern's post about using instantclick.io/.

Thanks again for your thorough elucidation.

Collapse
 
rhymes profile image
rhymes

My pleasure, if you want to know more let me know. You can find some more info in docs.dev.to