Last-Modified Not Included

Asked 1 years ago, Updated 1 years ago, 86 views

I would like to confirm the last update date of the site, but when I looked at the contents of the source, it was not written.
So I checked the response header with the following command, but there was no Last-Modified item.(I tried it on other sites, but it was not found in the same way.)

 curl --head https://www.youtube.com/

I looked into the reason and thought it was because of the server's configuration, but if there is any other possibility,
I asked a question because I wanted someone who knows more about it to tell me.(It's strange that all the sites I tried do not contain Last-Modified.)

http curl

2022-09-29 22:51

1 Answers

The Last-Modified header is determined by RFC7232 (partial excerpt):

An origin server SHOULD send Last-Modified for any selected
presentation for which a last modification date can be reasonably
and consistently determined,

It says SHOULD instead of MUST, and the web server does not necessarily need to send Last-Modified.

For example, Web services that generate dynamic pages, such as CGM such as YouTube, often do not add Last-Modified because the response date and time (value in the Date header) becomes less meaningful.


2022-09-29 22:51

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.