Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Seems like there is still a significant amount of initial latency by waiting for the first-byte of the HTML before making the subsequent requests for the dependent resources.

To actually minimize latency the server should understand what resources the HTML file is dependent on, and eagerly send those in addition to the request resource. i.e.

    client: send me index.html and dependent resources
    server: here is index.html, along with
            other initial resources you didn't ask
            for but will need
This avoids the latency of the second round-trip time to ask for dependent resources. Does anyone know if HTTP/2 allows for a scheme like this?


That is one of the main advantages of HTTP2 - it's called server push. When the server receives a request, it can send the headers for the requested resource plus the headers for as many related resources as it wants. The client can choose to either disable this, or reject pushed streams when it receives their headers.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: