]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/commit
Starting to fix handling of the HTTP validator headers, Last-Modified,
authordairiki <dairiki@96ab9672-09ca-45d6-a79d-3d69d39ca109>
Sun, 16 Feb 2003 05:09:43 +0000 (05:09 +0000)
committerdairiki <dairiki@96ab9672-09ca-45d6-a79d-3d69d39ca109>
Sun, 16 Feb 2003 05:09:43 +0000 (05:09 +0000)
commit879e476466fc315b598410e4d5548e4ee85614c9
treee3911f56e10ad054de157047f3a94678a6441d0e
parentb7f4a654965e53efe337f08d35dc942c85304cb9
Starting to fix handling of the HTTP validator headers, Last-Modified,
and ETag.

Last-Modified was being set incorrectly (but only when DEBUG was not
defined!)  Setting a Last-Modified without setting an appropriate
Expires: and/or Cache-Control: header results in browsers caching
the page unconditionally (for a certain period of time).
This is generally bad, since it means people don't see updated
page contents right away --- this is particularly confusing to
the people who are editing pages since their edits don't show up
next time they browse the page.

Now, we don't allow caching of pages without revalidation
(via the If-Modified-Since and/or If-None-Match request headers.)
(You can allow caching by defining CACHE_CONTROL_MAX_AGE to an
appropriate value in index.php, but I advise against it.)

Problems:

  o Even when request is aborted due to the content not being
    modified, we currently still do almost all the work involved
    in producing the page.  So the only real savings from all
    this logic is in network bandwidth.

  o Plugins which produce "dynamic" output need to be inspected
    and made to call $request->addToETag() and
    $request->setModificationTime() appropriately, otherwise the
    page can change without the change being detected.
    This leads to stale pages in cache again...

git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@2566 96ab9672-09ca-45d6-a79d-3d69d39ca109
lib/WikiPlugin.php
lib/display.php
lib/plugin/RecentChanges.php