joined:Apr 1, 2016
I have begun using asynchronous web frameworks. In my case I'm using Python Quart which is an async wrapper for Flask.
Typically the web server receives a request from a client. It processes the request, waits for data from the DB, generates the entire page, and then sends all the data back to the client for rendering by the browser. As such the client needs to wait for the entire page to be processed before the client can get the first byte.
By streaming the page's content, the above the fold content can be prioritized, generated, sent to the client while the below the fold content can be left to wait for i/o blocking assets such a data from the DB. Then as this data becomes available it can be sent to the client. The benefit of the streamed content is that the client can get the first byte as well as the above the fold content in milliseconds.
The upside is that the user sees the content much sooner but the down side is that browser can end up with a really long page load time.
The question is how does Googlebot handle the stream? Will Googlebot wait around for a long time? What impact will it have on Google's page speed measure?
The other advantage for my use case is that I can reduce the number of request to the server, because with streaming I will be able to generate images and send them with page directly as opposed to sending a page with an image url, that will then result in another request to the server, and then to the DB etc. This will reduce the load on the server and likely increase speed.
Has anybody tried this?