[{"data":1,"prerenderedAt":222},["ShallowReactive",2],{"term-s\u002Fssr":3,"related-s\u002Fssr":198},{"id":4,"title":5,"acronym":6,"body":7,"category":176,"description":177,"difficulty":178,"extension":179,"letter":180,"meta":181,"navigation":182,"path":183,"related":184,"seo":191,"sitemap":192,"stem":195,"subcategory":196,"__hash__":197},"terms\u002Fterms\u002Fs\u002Fssr.md","SSR","Server-Side Rendering",{"type":8,"value":9,"toc":170},"minimark",[10,15,19,23,26,30,159,163,166],[11,12,14],"h2",{"id":13},"eli5-the-vibe-check","ELI5 — The Vibe Check",[16,17,18],"p",{},"SSR means the server builds your HTML before sending it to the user's browser. Instead of sending empty HTML and loading JavaScript, you send a fully-formed page. It's fast on first load and Google can read it, but your server has to do more work.",[11,20,22],{"id":21},"real-talk","Real Talk",[16,24,25],{},"SSR generates HTML on the server per request, sends it to the client, then hydrates it with JavaScript for interactivity. Benefits include better SEO, faster Time-to-First-Byte, and good performance on slow devices. Tradeoffs include higher server load and hydration complexity.",[11,27,29],{"id":28},"show-me-the-code","Show Me The Code",[31,32,37],"pre",{"className":33,"code":34,"language":35,"meta":36,"style":36},"language-javascript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F Next.js SSR per request\nexport async function getServerSideProps() {\n  const data = await fetch('https:\u002F\u002Fapi.example.com\u002Fposts');\n  return { props: { posts: await data.json() } };\n}\n","javascript","",[38,39,40,49,74,112,153],"code",{"__ignoreMap":36},[41,42,45],"span",{"class":43,"line":44},"line",1,[41,46,48],{"class":47},"sHwdD","\u002F\u002F Next.js SSR per request\n",[41,50,52,56,60,63,67,71],{"class":43,"line":51},2,[41,53,55],{"class":54},"s7zQu","export",[41,57,59],{"class":58},"spNyl"," async",[41,61,62],{"class":58}," function",[41,64,66],{"class":65},"s2Zo4"," getServerSideProps",[41,68,70],{"class":69},"sMK4o","()",[41,72,73],{"class":69}," {\n",[41,75,77,80,84,87,90,93,97,100,104,106,109],{"class":43,"line":76},3,[41,78,79],{"class":58},"  const",[41,81,83],{"class":82},"sTEyZ"," data",[41,85,86],{"class":69}," =",[41,88,89],{"class":54}," await",[41,91,92],{"class":65}," fetch",[41,94,96],{"class":95},"swJcz","(",[41,98,99],{"class":69},"'",[41,101,103],{"class":102},"sfazB","https:\u002F\u002Fapi.example.com\u002Fposts",[41,105,99],{"class":69},[41,107,108],{"class":95},")",[41,110,111],{"class":69},";\n",[41,113,115,118,121,124,127,129,132,134,136,138,141,144,147,150],{"class":43,"line":114},4,[41,116,117],{"class":54},"  return",[41,119,120],{"class":69}," {",[41,122,123],{"class":95}," props",[41,125,126],{"class":69},":",[41,128,120],{"class":69},[41,130,131],{"class":95}," posts",[41,133,126],{"class":69},[41,135,89],{"class":54},[41,137,83],{"class":82},[41,139,140],{"class":69},".",[41,142,143],{"class":65},"json",[41,145,146],{"class":95},"() ",[41,148,149],{"class":69},"}",[41,151,152],{"class":69}," };\n",[41,154,156],{"class":43,"line":155},5,[41,157,158],{"class":69},"}\n",[11,160,162],{"id":161},"when-youll-hear-this","When You'll Hear This",[16,164,165],{},"\"Use SSR for pages with user-specific data that changes per request.\" \u002F \"SSR gives better SEO than a pure SPA.\"",[167,168,169],"style",{},"html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":36,"searchDepth":51,"depth":51,"links":171},[172,173,174,175],{"id":13,"depth":51,"text":14},{"id":21,"depth":51,"text":22},{"id":28,"depth":51,"text":29},{"id":161,"depth":51,"text":162},"frontend","SSR means the server builds your HTML before sending it to the user's browser.","intermediate","md","s",{},true,"\u002Fterms\u002Fs\u002Fssr",[185,186,187,188,189,190],"SSG","CSR","ISR","Hydration","Nuxt","Next.js",{"title":5,"description":177},{"changefreq":193,"priority":194},"weekly",0.7,"terms\u002Fs\u002Fssr",null,"nEhsFCg9fpJZBYLh1uL4v1PqioXQk3x9QCYcG96gZzI",[199,204,207,212,215,218],{"title":186,"path":200,"acronym":201,"category":176,"difficulty":202,"description":203},"\u002Fterms\u002Fc\u002Fcsr","Client-Side Rendering","beginner","CSR means the browser downloads a mostly-empty HTML page plus a big JavaScript bundle, then builds the full page in the browser.",{"title":188,"path":205,"acronym":196,"category":176,"difficulty":178,"description":206},"\u002Fterms\u002Fh\u002Fhydration","Hydration is when a server-rendered HTML page comes alive in the browser.",{"title":187,"path":208,"acronym":209,"category":176,"difficulty":210,"description":211},"\u002Fterms\u002Fi\u002Fisr","Incremental Static Regeneration","advanced","ISR is the best of both SSG and SSR. Pages are pre-built statically but can automatically rebuild themselves in the background after a set time.",{"title":190,"path":213,"acronym":196,"category":176,"difficulty":178,"description":214},"\u002Fterms\u002Fn\u002Fnext-js","Next.js is React's big sibling that adds superpowers like SSR, SSG, file-based routing, and API routes.",{"title":189,"path":216,"acronym":196,"category":176,"difficulty":178,"description":217},"\u002Fterms\u002Fn\u002Fnuxt","Nuxt is Vue on steroids. It's a meta-framework that adds SSR, SSG, file-based routing, auto-imports, and a full deployment pipeline on top of Vue.",{"title":185,"path":219,"acronym":220,"category":176,"difficulty":178,"description":221},"\u002Fterms\u002Fs\u002Fssg","Static Site Generation","SSG builds all your pages ahead of time — before anyone visits. You get a folder of plain HTML files that are blazing fast to serve from a CDN.",1776518310488]