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.
精彩评论