Yes.
I would argue strongly for something very simple here even at the expense
of an extra transaction.
C: GET /foo.html HTTP/2.0
Accept: text/html, text/plain
S: HTTP/2.0 200 it is my pleasure to serve you this document...
Content-Type: text/html
S: sends file <closes connection>
So far its identical to 1.0.
C: MGET /images/bar1.gif /images/bar2.gif /images/bar3.gif HTTP/2.0
Accept: image/gif, image/x-xbm
S: HTTP/2.0 0200 a picture is worth a thousand words...
URI: /images/bar1.gif
Content-Type: image/gif
Content-Transfer-Encoding: packet
4006
... 4006 bytes of image data ...
-1
HTTP/2.0 0200 a picture is worth a thousand words...
URI: /images/bar2.gif
Content-Type: image/gif
Content-Transfer-Encoding: packet
5541
... 5541 bytes of image data ...
-1
HTTP/2.0 0200 a picture is worth a thousand words...
URI: /images/bar3.gif
Content-Type: image/gif
Content-Transfer-Encoding: packet
4306
... 4306 bytes of image data ...
-1
S: <closes connection>
This seems to me to have a number of advantages:
1) Simplicity. Simple to implement for clients and servers.
2) Preserves statelessness of the server (VERY IMPORTANT).
3) After first transaction the client can decide which inline images it
needs/wants and request only them. Thus it works for clients which
don't want images or have them cached.
4) Works fine with a 1.0 client and 2.0 server. The initial request
from client is a 1.0 request and subsequently the three images would
be requested in three 1.0 transactions.
5) Works with a 2.0 client and 1.0 server. The initial 2.0 request is
treated by the server as a 1.0 request. The client gets the response
and sees the server is only 1.0 so it gets the three images in three
1.0 requests.
The only drawback that I see is two transactions are required to get
the html document and all the inline images. This seems a small price
to pay. In fact, I cannot see a clean way to do this in one
transaction.
--John Franks Dept of Math. Northwestern University [email protected]