What Every Web Developer Should Know About HTTP

The finer points of HTTP and web server operation are beyond the scope of this book, but there are a few things about HTTP that every site builder should know, regardless of her particular specialty.

A page request including additional requests for stylesheets, script files, and images

Figure A-2. A page request including additional requests for stylesheets, script files, and images

There are minimal provisions for excessive network latency, and the few that exist involve session termination (better known as a timeout)

Since it’s impossible to predict in all cases the state and extent of the network between server and browser, one can never assume the order in which page components will load, or the length of time it will take for a page to finish loading.

Any request for a single page will usually result in a series of requests pointed at multiple URIs

Pages contain images, multimedia, code libraries, and other external resources, as shown in Figure A-2. In high-latency environments, delays can create or compound user experience issues, and in high-volume environments, improper resource management can overtax a web server. As a result, it’s a good idea to actively seek the best trade-off between server resource utilization and network utilization—a search that is at least partly the responsibility of the HTML/CSS practitioner.

HTTP is functionally stateless

“Stateless” in this case means that each transaction between ...

Get HTML & CSS: The Good Parts now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.