Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
header("Cache-control: public");
header("Expires: " . gmdate("D, d M Y H:i:s", time() + 60*60*24) . " GMT"); // на сутки
This is not enough. In any case, the browser sends a request to the server with the question - has the data changed? The server sends a Status Code header with a value of 304 Not Modified and the browser loads the page from the cache if the data received from the browser matches.
Personally, I recommend using etag - it's more convenient.
ps I wanted to write that you must write this logic in the code, the server does not track php without you.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question