Tuesday, 2 May 2017

How to respond immediately?

I am working with NodeJS + Server-Side-Rendering. So, while the HTML is rendering, instead of making the client wait on a blank screen, I would like to render this HTML:

<!DOCTYPE html>
<html>
  <head><title>PageTitle</title></head>
  <body><h1>Loading....</h1></body>
</html>

And, once the server-side is ready with the html, I want to stream it to the client. Basically, I would like to replace the html mentioned above with the html that has been created/rendered...

Could I do something with streams?



via Akash

No comments:

Post a Comment