Can I find the creation/last modified date of an html file? For example, I would like to know when some index.html file from some website was created, not when I downloaded it.
Most browsers don't do anything special to set the time stamp on a downloaded file, so the file ends up being dated from the download. Download managers usually change the downloaded file's modification time to match the
Last-Modified header sent by the server. With command line tools, use
curl -R to set the file's modification time to the time sent by the server (and
wget --no-use-server-timestamps or
curl to set it to the download time).
The server will generally set the
Last-Modified header to the time the file was last modified, if the content of the URL is stored as a file. In these days of dynamically-generated content, that's not so common anymore. There's no way to get the creation date; most filesystems don't even record it.