If-Modified-Since header does not works
It does not reseive 304 code. I check it on https://last-modified.com/en/ and https://bertal.ru/index.php?a6[...]i.org/doc/HomePage#h .
In my istallation R5.5.10 I fix it by inserting php code provided on Last-Modified.com to first line of \theme\_common\_header.php
Probably there is more beautiful solution.
Show Files (2 files)
Comments
Log in or create an account to post a comment.
If-Modified-Since header does work
Loged in
Guest
Please read the http class for more details, see
function check_http_request().Can't say why the mentioned service don't recognize it.
In the http class there is the comment:
Do we need HEAD support?
Patch for HEAD support: revision:441dadd
diff --git a/wacko/class/http.php b/wacko/class/http.php --- a/wacko/class/http.php +++ b/wacko/class/http.php @@ -191,7 +191,7 @@ $lastm = substr($lastm, 0, $p); } - if ($_SERVER['REQUEST_METHOD'] == 'GET') // may be we need HEAD support ??? + if ($_SERVER['REQUEST_METHOD'] == 'GET' || $_SERVER['REQUEST_METHOD'] == 'HEAD') { if (!$lastm && !$etag); else if ($lastm && $gmt != $lastm);But we can't send body for HEAD requests -> Apache will do all the heavy lifting (stripping the response body).
https://developer.mozilla.org/[...]eb/HTTP/Methods/HEAD
304 code response delay
runfunction there is the following lineif (!$user && $this->page['modified']) { header('Last-Modified: ' . Ut::http_date(strtotime($this->page['modified']) + 120)); }which causes the 304 code response delay, I'm currently not sure which purpose that delay serves exactly.
https://redbot.org/
PATCH: 5b8f3a3