Bug: http-equiv expire example may be incorrect?
the example prefs for
TWikiPreferences shows an example
for page expiration:
http-equiv meta tags for edit script. Example to expire immediately:
Set HTTP_EQUIV_ON_EDIT = {meta http-equiv="Expires" content="04 Feb, 2026 - 08:50:49 GMT"}
I'm not sure this example is correct-- is the comma in the correct place after the MONTH? The
HTML 4.01 spec says,
META and HTTP headers
The http-equiv attribute can be used in place of the name attribute
and has a special significance when documents are retrieved via the
Hypertext Transfer Protocol (HTTP). HTTP servers may use the property
name specified by the http-equiv attribute to create an [RFC822]-style
header in the HTTP response. Please see the HTTP specification
([RFC2616]) for details on valid HTTP headers.
The following sample META declaration:
META http-equiv="Expires" content="Tue, 20 Aug 1996 14:25:27 GMT"
will result in the HTTP header:
Expires: Tue, 20 Aug 1996 14:25:27 GMT
This can be used by caches to determine when to fetch a fresh copy of
the associated document.
Test case
Environment
| TWiki version: |
dec prod release |
| TWiki plugins: |
|
| Server OS: |
linux |
| Web server: |
apache |
| Perl version: |
|
| Client OS: |
|
| Web Browser: |
|
--
TWikiGuest - 28 Dec 2001
Fix record
You are correct, an older
HTML 3.0 page has a sample date format of "Tue, 04 Dec 1993 21:29:02 GMT", see
http://www.w3.org/MarkUp/html3/dochead.html
Example has been updated.
--
PeterThoeny - 31 Dec 2001
HTTP_EQUIV_ON_EDIT should not be used at all for cache control / document expiration, as this would cause
BackFromPreviewLosesText - see
BugInHttpEquiv. Other use of these variables for view and other scripts may work, but see
ViewAfterSaveCachesOldPage, as this is quite a complex issue that probably requires core code to resolve that problem.
Many proxy caches don't look at the
HTML document, so unless the origin web server or some upstream cache parses the
HTML document and generates HTTP headers, these settings will only affect the web browser.
--
RichardDonkin - 02 Jul 2003