PDA

View Full Version : What is server-side rendering vs client-side rendering?



pharmasecure
04-18-2022, 01:46 AM
What is server-side rendering vs client-side rendering?

makoo
04-18-2022, 03:29 AM
Server-side rendering and client-side rendering both have their pros and cons, but generally speaking… Server-side rendering: Server-side rendering, also known as "static" or "flat" page generation, takes place on the web server. With this option, the web server generates a complete HTML page with all of your content and submits it to the browser when the visitor makes a request. This method has several advantages: -Your content is visible to search engines immediately upon publication. -Server-side rendered pages are preloaded for search engines. This improves your site's SEO performance. -Search engines have an easier time indexing and crawling server-rendered content. Client-side rendering: Client- side rendering, or dynamic generation, occurs on the user's computer after the browser has requested an HTML page from the server. The browser initiates a connection with the web server that returns an HTML document that contains JavaScript functions. Then, when the visitor calls one of these functions (usually by clicking on a link), the client- side code creates all of the HTML elements on their local machine and transmits them back to the web server where they are assembled into a complete page

Electrum
04-18-2022, 05:07 AM
In server-side rendering when a user makes a request to a webpage, the server prepares an HTML page by fetching user-specific data and sends it to the user’s machine over the internet. The browser then construes the content and displays the page. This entire process of fetching data from the database, creating an HTML page and sending it to client happens in mere milliseconds.


When we talk about client-side rendering, it’s about rendering content in the browser using JavaScript. So instead of getting all the content from the HTML document itself, a bare-bones HTML document with a JavaScript file in initial loading itself is received, which renders the rest of the site using the browser.

chris26
04-19-2022, 10:02 AM
server side rendering is better for SEO and has better page speed so that also helps seo. If you want to use java script then just make some inner pages with less content and use java on them. You want to use less hosting and keep page speed fast no matter what.