This class is used to negotiate the current HTTP Request response.
It issues full Response headers, and can eventually change the response depending on the Request headers sent by the browser (the same actions that web-servers make for static files).
The class can serve load-balanced compressed output if the browser supports compression and the response content type is worth it, like for instance with HTML, XML, plain text, etc. (Accept-Encoding).
It can also avoid sending the response content if it is determined that it was previously sent and cached to the browser and has not changed since then (304 Not Modified).
It can also send a part of the response content if the browser request it (206 Partial content).
The class will also send Content-Type, Content-Language, Expiry, Cache-Control Response headers.
It will also report the Referer, browser user agent and operating system.
The class can also serve custom pages for errors, automatically fixed for serving to Microsoft Internet Explorer browsers (404 Not Found, 410 Gone, and other).
3 lines of code to implement. All setup parameters have defaults. All defaults may be changed. < 0.002 secs in typical operation. In use on busy websites right now. |