Answer the question
In order to leave comments, you need to log in
How to set the Last-Modified and If-Modified-Since HTTP headers in a Laravel blog?
Hello, friends!
Noob question. I'm just learning.
Can you please tell me the best way to implement the Last-Modified and If-Modified-Since HTTP headers in a simple blog written in Laravel?
More about headers: https://last-modified.com/ru/if-modified-since.html
When updating a post, the correct Last-Modified should be returned.
If the post was not updated - 304 Not Modified.
The blog works over HTTPS, Lets Encrypt.
LEMP, PHP 7.1
Thanks in advance for your replies.
Answer the question
In order to leave comments, you need to log in
Laravel has a handy tool , so link whatever you need to all the answers.
These headers are commonly used for caching, so you might want to look into the caching features that Laravel provides so you don't mess with your bike.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question