cnp/0.4 contnet.org/draft/cnp-server-push/ cnp/0.4 ok length=1715 modified=2021-02-05T08:26:28Z name=index.cnm time=2024-04-18T23:10:32Z type=text/cnm title CNP server push (draft) content section Overview text fmt CNP @@/draft/cnp-batch/ batch requests@@ and the simplicity of parsing CNM could be combined to provide an equivalent of @@https://en.wikipedia.org/wiki/HTTP/2_Server_Push HTTP/2 server push@@ and provide embedded content within the same round-trip that requests the page itself. The general idea is to have the client specify a request parameter (e.g. ``accept_push``) with a list of embedded types, maximum counts and maximum sizes that it will accept in the server push. The server then parses the CNM page, looking for ``embed`` blocks, and adds the content of any that match the client's parameter to a batch response. If the request was a batch request, the server push batch response is merged with the regular batch response. Any embedded content that was already requested in the batch request without a selector is not pushed. As usual, the client may close the connection after reading only a part of the entire batch response (for example, after finding a pushed response that does not match its parameters). The benefits of server push are most notable in situations where establishing a new connection with all TCP and TLS round trips takes too long, such as satellite connections or mobile data links with poor signal. Otherwise, a simple request for the page followed by a batch request for embedded content could be sufficient. Using caching parameters like ``if_modified`` would also not be possible without a more complicated implementation of server push. site draft cnp-server-push links /spec/ Specifications /doc/ Documents /draft/ Drafts /lib/ Libraries /util/ Tools and utilities