php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18897 Erroneous 404 and others cache-unfriendly headers
Submitted: 2002-08-13 22:44 UTC Modified: 2003-01-17 22:10 UTC
From: om_phpnetbug028 at olden dot ch Assigned:
Status: No Feedback Package: Website problem
PHP Version: 4CVS-2002-08-13 OS: any
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2002-08-13 22:44 UTC] om_phpnetbug028 at olden dot ch
I was wondering why my web caches dislike www.php.net (and its mirrors) so much, esp. the documentation pages.
It looks like the HTTP headers of such pages are definitely cache-unfriendly:
- No 'Last-Modified:'. $LAST_UPDATED could be put to good use here.
- 'max-age=600' is IMHO way too agressive, esp for docs which don't change often. This directive shouldn't even be necessary if a Last-Modified was issued.
- 'Vary: Cookie' even for pages which are not part of a session.
- Erroneous 404. This one only appears on the printer-friendly pages:

$ squidclient 'http://www.php.net/manual/en/print/'
HTTP/1.0 404 Not Found
Date: Wed, 14 Aug 2002 02:37:28 GMT
Server: Apache/1.3.26 (Unix) PHP/4.3.0-dev
X-Powered-By: PHP/4.3.0-dev
Cache-Control: public, max-age=600
Vary: Cookie
Content-Language: en
Content-Type: text/html;charset=ISO-8859-1
X-Cache: MISS from rs1.php.net
X-Cache: MISS from nestor.olden.ch
X-Cache: MISS from cache.snwl.olden.ch
Proxy-Connection: close

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
 <title>PHP: PHP Manual</title>
</head>
<body ...

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-14 05:32 UTC] sander@php.net
I've fixed the 404's on /manual/*/print/*.
 [2002-08-14 21:54 UTC] rasmus@php.net
The pages do actually change quite often given all the user notes.  But yes, 600 may be too aggressive.
 [2002-11-18 03:50 UTC] jean at megaweb dot co dot za
what does your special url search feature do to your error logs?

eg. www.php.net/findsomething

I have been playing around with the idea of fetching content using 404 but even if I use header('HTTP/1.1 200 OK'); it still shows up in the server error logs.

How do you get around this?
 [2003-01-02 20:06 UTC] nicos@php.net
Is it still an issue?

Thank for your report.
 [2003-01-03 07:59 UTC] goba@php.net
OK, so I have added the last-modified header now, and removed the cache control header. Vary: Cookie is not for nothing there. We have a cookie which do affects the display of manual pages, and we will introduce another cookie probably in the future (you'll be informed). The errorneous 404 is already corrected by Sander. So please check if there is still any problem with the pages...
 [2003-01-17 22:10 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 13:01:29 2024 UTC