It works as expected. Just checked so as to be 100% sure. How do you request the document?
BTW, the 304 response code is returned by the web server and not wordpress.
Please check the description page for examples using curl
.
I’m marking this topic as resolved. Please feel free to re-open if it does not work for you.
George
Thread Starter
mihdan
(@mihdan)
I’m sorry, I did not know what the header should give the server
Hello,
Please use curl like this.
First take a note of the date returned in the Last-modified
header.
curl -I -L http://example.org/sample-page/
...
...
Last-Modified: Sun, 12 Oct 2014 04:19:00 GMT
...
...
Then send the If-Modified-Since
header by providing a date later than the above (here I check for a time ~5 hours ahead of the Last-Modified
time).
curl -I -L -H "If-Modified-Since: Sun, 12 Oct 2014 09:00:00 GMT" http://example.org/sample-page/
The response should contain:
HTTP/1.1 304 Not Modified
...
...
...
Hope this helps.
George
Considering to add my last post to a mini curl tutorial on the description page. If this hasn’t been helpful enough, please let me know.
Or you could be lazy and check it here ~ https://varvy.com/tools/if-modified/