PHP Classes

Classes of Alex Kemp

Recommend this page to a friend!
  All class groups  >  All authors  >  Classes of Alex Kemp (1)  >  Mission progress status  >  Reputation  
Picture of Alex Kemp
Name: Alex Kemp <contact>
Classes: 1
Country: United Kingdom
Age: 75
All time rank: 2801128 in United Kingdom
Week rank: 195 Up9 in United Kingdom Up
All time users: 720
Week users: 0
Innovation award
Innovation award
Nominee: 1x
 

 

  A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z  
  Files folder image Conteg Content Negotiation  
PHP Programming Innovation award nominee
March 2007
Number 6


Prize: One book of choice by SAMS
Negotiate HTTP Request Response
Conteg is used to negotiate the current HTTP Request response.

Most PHP-produced webpages are slower to arrive at the browser than they need to be. Conteg is designed to auto-allow full use of HTTP Content Negotiation. Even in it's most minimal form--3 lines of code--it will reduce server bandwidth + speed up document delivery three- to five-fold.

Accept-Encoding:
Load-balanced compressed output if the browser accepts it is auto-negotiated by default.

Expires:
Cache-Control:
Last-Modified:
Conteg sends an Expires header of 1 hour by default. Cache-Control + Last-Modified headers can be added by means of setup switches, in which case Conteg will auto-negotiate If-Modified-Since + If-Unmodified-Since, auto-sending a `304 Not Modified' if appropriate.

ETag:
Ranges:
If turned on via setup switches, Conteg will auto-negotiate If-None-Match, If-Match, If-Range + Range, auto-sending `406 Not Acceptable', `412 Precondition Failed', `416 Requested Range Not Satisfiable' or `206 Partial content' if appropriate.

Charset:
Language:
Media-Type:
If turned on via setup switches, Conteg will report these within the document headers. Class functions are provided to allow content negotiation outside the Class.

Conteg reports the Referer, browser User-Agent and Operating System.

The class can also serve custom error-pages, auto-fixed for serving to Microsoft Internet Explorer browsers (404 Not Found, 410 Gone, and other).

3 lines of code to implement on a page. All setup parameters have defaults. All defaults may be changed. < 0.002 secs in typical operation. In use on busy websites right now.


  A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z