4 ms·
How would you render (to a cache) server-side if the rendering depends on the display size in a complicated way (too complicated for CSS to handle)? Edit: yes,
by amelius 11y ago
How would you render (to a cache) server-side if the rendering depends on the display size in a complicated way (too complicated for CSS to handle)?
Edit: yes, I understand that rendering means generating HTML, but sometimes the HTML depends on display size.
- imaginenore 11y agoRendering means generating HTML in this case. The HTML rendering happens in the browser.
- firasd 11y agoI suppose it depends on how complicated the logic is behind your conditional HTML. If there is an initial JS payload that checks the screen size, I might still try to get an HTML string back from the server after checking the size. But there are certainly diminishing returns to server-side rendering if you're making multiple HTTP calls anyway.