SproutCMS

This is the code documentation for the SproutCMS project

function etag()

Set the etag header, and some expiry headers.
Checks if the etag matches - if it does, terminates the script with '304 Not Modified'.

ETag should be specified as a string.
Expires should be specified as a number of seconds, after that time the URL will expire.

ETags should be something which is unique for that version of the URL. They should use
something which is collission-resistant, such as MD5. They should vary based on the
Accept-Encoding header, or any other 'accept' headers, if you are supporting them.

Usage

void Sprout::etag ( mixed $etag , mixed $expires );

Arguments

  1. $etag
  2. $expires

Return value

  • void