Tags:
create new tag
, view all tags

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="09 Oct, 2017 - 09:49:13 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

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2003-07-02 - RichardDonkin
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.