Server side rendering is where a request is made from the client/browser to the server, and then at that point the HTML is generated on-the-fly run-time and sent back to the browser to be rendered.
Static site rendering is very similar, however the parsing is carried out during the build time instead. Therefore when a request is made the HTML is stored statically and can be sent straight back to the client.
They both have their pros and cons:
Although static sites will be faster at run-time as no server-side processing is required, it does mean that any changes to data require a full rebuild over the application server side.
Alternatively, with the server side approach, putting any caching aside, the data is processed on-the-fly and sent straight to the client.
Often the decision is best made depending on how dynamic and real-time your content must be vs how performant the application needs to be.
For example, Stackoverflow most likely uses a server-side rendering approach. There are far two many questions for it to rebuild static versions of every question page each time a new post is submitted. The data also needs to be very real-time with users being able to see posts submitted only seconds ago.
However, a blog site, or promo site, which hardly has any content changes, would benefit much more from a static site setup. The response time would be much greater and the server costs would be much lower.
- What is the difference between server side rendering (Next.js) and Static Site rendering (Gatsby.js)?
- What is the difference between React Native and React?
- What is the difference between state and props in React?
- What is the difference between HashRouter and BrowserRouter in React?
- What is the difference between .ts and .tsx extensions. Both are used as extensions for typescript files in react. So where should we use them?
- What is the difference between redux-thunk and redux-promise?
- What is the difference between componentWillMount and componentDidMount in ReactJS?
- What is the difference between NextJs and Create React App
- What is the difference between jest.fn() and jest.spyOn() methods in jest?
- What is the technical difference between .jsx and .js files
- What is the difference between hashHistory and browserHistory in react router?
- What is the difference between Reactjs and Rxjs?
- What is the difference between .env.local and .env.development.local?
- What is the difference between Jest and enzyme?
- What is the difference between `PropTypes.node` and `PropTypes.any` in react?
- What is the difference between render and return in reactjs?
- What is the difference between Redux Thunk and Redux Saga?
- what is the difference between import and const and which is preferred in commonjs
- What is the difference between Box and Grid in Material-UI?
- What is the difference between @material-ui and @mui
- What is the difference between .js, .tsx and .jsx in React?
- What is the difference between useQuery and useLazyQuery in Apollo graphQL?
- React Native - What is the difference between StyleSheet.absoluteFill() and StyleSheet.absoluteFillObject()?
- react-redux: What is the difference between state.setIn() and state.set()?
- In React, what is the difference between onKeyUp and onKeyUpCapture (and onKeyDown/Capture)?
- What is the main difference between using React-Redux Hooks and React-Redux Connect()?
- What is the main difference between React Query and Redux?
- what is the difference between ( )=>React.FC and ( )=>JSX.Element
- what is the difference between React.HTMLProps<> and React.HTMLAttributes<T>?
More Query from same tag
- how to get value from a fulfilled promise in react
- How to set a defaultChecked to only first input in radio button when using map function in reactjs
- Mix Redux Store with states
- Variable of state update on LayersControl.Overlay checkbox toggle
- How to render FunctionComponent when passed as parameter?
- Import css or scss file into Fable/F# React Component?
- capturing events in ReactJS
- React: Mapping data
- React app 'crashes' due to fetch/axios inability to correctly pass error to catch block
- Is it possible to use Style System's breakpoints inside a Styled-Component?
- Failed prop type: Invalid prop `component` supplied to `Field`. after installing mui v4
- Can I destructure items using interpolated strings?
- React Use State Hook error TypeError: setUser is not a function
- How do I get my express server to GET a request from my React client app?
- Fetch data from NewsApi (react, axios)
- plotly is undefined in react
- How to use an image in the input group in Bootstrap 4
- How to render one component per state-object in React?
- Adding the sub Route in the react js React router v4
- Pass prop from child to parent React
- How to call getSource within Nested ArrayInput / FormDataConsumer in react-admin
- React Radium Class Style Overrides
- Client side React componentDidMount not called (without JSX)
- Tyepscript Array.map returns array of JSX.Element instead of custom component type
- Transition on state change React
- When React requests to Django API, net::ERR_SSL_PROTOCOL_ERROR is occured
- Using async and await with export const
- I cannot understand what the error is and why e.currentTarget.value is null
- ReactJS best practice with complex data structures