Every WWW connection is in a sense delayed by its accompanying HTTP headers. Some of these headers are necessary. Others aren't.
For example:
HTTP/1.1 200 OK Date: Thu, 19 Sep 2002 17:30:05 GMT Server: Apache/1.3.26 (Unix) Last-Modified: Wed, 18 Sep 2002 01:48:31 GMT Accept-Ranges: bytes Content-Length: 13310 Connection: close Content-Type: text/html
The response starts with a line similar to HTTP/1.1 200 OK, and then specifies additional lines of information in the format Name: value (name colon value). Order and case do not matter.
Headers are abused far too much, and far too many exist. If I had to supply a boilerplate set of headers, I would use only Content-Type, Content-Length, Date, and Last-Modified. The rest should always make sense; if implicitness creates confusion, a mistake is being made.
Lines are separated by CRLF; however, it is my persuasion that this must be replaced by LF alone, the sooner the better. See my modified version of publicfile.
5-17-03: I recommend the adoption of a
Redistribute
header in either HTTP or UAR
for distributed service. Essentially the concept is that
once numerous copies of a resource exist, there is no
need for the same single server to supply all further
copies. If another server intends to provide some access
to its own downloaded copy of a file, then it may so
indicate to another server with the Redistribute:
[URL] header (or redistribute:url in UAR)
accompanying its request.
Once any server supplying a resource knows of another
server, it may at its discretion supply a
Location: URL
header in response to some
requests above its capacity to respond. A distribution
server may require a server indicating the
Redistribute
header to also supply the
MD5 sum of the resource to guarantee its validity
(by comparison with the server's own master copy)
before adding its URL to its list of possible
redistributor addresses.
I suggest that in the short-to-mid-term it may be
extremely helpful for the majority of small resources
to also be redistributed in this manner to all
internet-connected computers while they maintain the
same server connection. That is, a server just
having provided a 21-KB GIF file to a certain
client should expect that the client supply its
IP address and a cache resource, e.g.,
Local: IP.addr/cache.id. The server
would reply to future responses from that client
for the resource by the negotiation
Location: IP.addr/cache.id
, from which
the client would use its own cache. This would
aid the present cache-negotiation techniques.
Obviously, if a resource changed, then the server
may release the new resource based on the information
it knew from the cache-date it previously stored
regarding that particular client's request. Also,
network caching servers may with their request supply a
Redistribute
header in place of the
Local
header, and then the original
server may refer future clients to them directly,
thus balancing the load soon after a resource
is first available.
Much of this negotiation work can be implemented in a small prolog to a present HTTP request-response implementation.