php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #6095 No Last-Modified and Content-Length header
Submitted: 2000-08-10 23:54 UTC Modified: 2000-08-11 17:52 UTC
From: mischa at high5 dot net Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0.1pl2 OS: FreeBSD 3.5/4.1
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mischa at high5 dot net
New email:
PHP Version: OS:

 

 [2000-08-10 23:54 UTC] mischa at high5 dot net
Hi,

If you would do:

wget -S <website>/<php_file>

This will tell you that there is no last-modified date or content-length in there.
I don't know if this is an actual bug, but for me this is very anoying because I do want to make my site more cacheable with php.
And this is very difficult without these headers.

Would it be possible to add this as a default?

Thanx!!

Mischa

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-11 00:38 UTC] hartmann@php.net
my 2 cents on this: 

last-modified does not make sense under many conditions, because the last-modified date of the script file is not equal to the last modification date of the data transmitted while executing this script. 

if you are using phplib sessions, you are able to set the caching for each individual page - no caching, private caching (your browser) and public caching (proxy servers) .

content-length leads into other trouble. 
if you got output buffering active, you could use a patch done by sascha (http://snaps.php.net/~sas/sapi-content-length-patch) . 

This does not work if you are using trans-id.
 [2000-08-11 17:52 UTC] hholzgra@php.net
last-modified does not make a lot of sense for
dynamic content and content-length is not easy
to determine before you actually do your output, but
has to be in the header

if you can fill theese headers with plausible information
depending on your scripts task then do so, 
in any other case stay wich Expires: and Cache-control:
headers

anyway, there is no perfect magic to do so so
it is your task as a developer and not php itself
to find appropriate values here
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Mon Jun 15 16:00:01 2026 UTC