Response Headers

There are also a number of headers that are usually sent to the browser by the server, and I will introduce some of the most important ones here. Appendix D includes an extensive list of headers that can be sent by both the browser and the server.

Cache-control

The Cache-control response header was added to HTTP 1.1 to provide more advanced methods of controlling the behavior of caching mechanisms like proxy servers. It is a more powerful replacement for the Pragma: no-cache response header, which is described a bit later. To prevent caching mechanisms from storing the entity sent with the response in their cache, you should use the Cache-control: no-cache response header.

Content-length

Content-length specifies the size of ...

Get Sams Teach Yourself CGI in 24 Hours, Second Edition 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.