Hej.
Próbuję obsłużyć statyczny cache w PHP ale mam mały problem. We wszystkich tutorialach używają $_SERVER['HTTP_IF_MODIFIED_SINCE'] i $_SERVER['HTTP_IF_NONE_MATCH']. Niestety u mnie zwracają null. Nagłówki do serwera są wysyłane poprawnie. etag i last modifier idą do przeglądarki i z powrotem przy zapytaniu. Co jest nie tak? Czy powinienem zmienić coś w ustawieniach serwera?
Korzystam z:
Server: Apache/2.2.20 (Ubuntu)
X-Powered-By: PHP/5.3.6-13ubuntu3.8
W razie czego dodam nagłówki:
Response Headersview source
Cache-Control must-revalidate, post-check=0, pre-check=0
Connection Keep-Alive, Keep-Alive
Content-Description File Transfer
Content-Length 18338
Content-Transfer-Encoding binary
Content-Type image/png
Date Tue, 11 Sep 2012 12:25:19 GMT
Etag "bb7abfa0326ec16b635128fecc21c833"
Expires 0
Keep-Alive timeout=5, max=100
Last-Modified 1347317413
Pragma public
Server Apache/2.2.20 (Ubuntu)
X-Powered-By PHP/5.3.6-13ubuntu3.8
Request Headersview source
Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding gzip, deflate
Accept-Language en-us,en;q=0.5
Cache-Control max-age=0
Connection keep-alive
Cookie PHPSESSID=4k1lu52e747b5ll8bh10re04t3
Host localhost
If-Modified-Since 1347317413
If-None-Match "bb7abfa0326ec16b635128fecc21c833"
User-Agent Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:15.0) Gecko/20100101 Firefox/15.0