VS server side rendering browser rendering

  • Rendering here, refers to the process of generating html documents, and browser rendering html does not matter.
    Rendering browser, it refers to the use js to generate html, routing the distal end. For example: React, Vue like front-end frame. Suitable for single-page application.
    Server-side rendering, referring generate html language used by some of the background template engine. Examples: PHP file, JSP file, Python Flask with Jinja the engine, Django framework, Java with vm template engine, NodeJS with Jade. Suitable for multi-page applications. In fact, most of the website or this form.
    So there is a single page in order to allow the application conducive to SEO, let the server and client isomorphic, also using React / Vue rendering program.

  • A client rendering route:
  1. A request html -> 2. html server returns a -> 3. html browser downloads inside js / css File -> 4. Wait js file download is complete -> 5. Wait for loading and initialization completion js -> 6. The js the code can finally run by the request data to the backend js code (ajax / fetch) -> 7. waiting for data to return the rear end -> 8. the client none to complete, the data is rendered as a response page
  • Server rendering route:
  1. Request a html -> 2. server request data (request for fast network) -> 3. initial rendering server (server performance, faster) -> 4. The server has returned the correct page of content -> 5. client requests js / css file -> 6. wait js file download is complete -> 7. wait for loading and initialization completion js -> 8. the remaining part of the client rendering is complete (small content, rendering fast)

https://www.cnblogs.com/aliwa/p/8505284.html

Guess you like

Origin www.cnblogs.com/cag2050/p/11234002.html