I am building a website that uses PHP, and would like to know how to send a Last-Modifed header that reflects the actual date that my files were last modified. As I'm sure you know, PHP strips away the Last-Modified header by default, meaning that the page is always considered fresh.
In order to take advantage of caching, I wish to apply PHP to manually send a Last-Modified header to reflect when the containing PHP file was last edited.
I have looked on the web and have found no satisfactory examples. Any code examples of how to achieve this would be gratefully appreciated.
(Please accept my apologies in advance if this sounds like bit a novice question.)
Nope.
and then
It gets returned as expected:
EDIT To get the real modification date use filemtime():