开发者

Last-Modified in http header

开发者 https://www.devze.com 2022-12-23 12:20 出处:网络
I request a website header, howev开发者_运维问答er, there is not Last-Modified info in this http header. I wanna creat a site map and get each file\'s date on the server. Don\'t understand why there i

I request a website header, howev开发者_运维问答er, there is not Last-Modified info in this http header. I wanna creat a site map and get each file's date on the server. Don't understand why there is not this info for some websites. How did some softwares, such as Xenu, get the file's date.


As Johannes Rössel points in his comment to your question, the Last-Modified header is not compulsory. If it is there, you can read it just like any other HTTP header (the exact method depends on your exact code so we can't say more until there's code). If it isn't there, you can't read it. It's as simple as that. You can't fetch information about remote resources unless the remote server provides such piece of info. That's valid for HTTP and most other network protocols.

0

精彩评论

暂无评论...
验证码 换一张
取 消