There is a link like www.xxx.ru/.../.../1.pdf, when you click on it, a pdf file opens in chrome. Is there any way to find out when this file was uploaded to the server in this folder?

  • If it were possible, hackers would be out of work)))) ... I think so ... - Air

1 answer 1

In general, no, because:

  1. The file itself does not store the recording time on the disk, these are file system attributes.
  2. The Http protocol does not contain fields that would contain information about the date the file was written to disk, since the protocol does not even contain the notion of "file". And it operates only with "content", that is, it does not matter for the client - the file was read from disk or was created on the fly.

However, there are a number of indirect signs that can work with certain servers:

  1. In http there is a Last-Modified header. If the file was saved before the web server was restarted (and before the cache was reset), then it will contain the date of the very first request to the resource.
  2. If "Directory Listing" is enabled on the server (which is not secure), then you can see what is written on the file system. And in this case, the servers (Apache, IIS) by default display additional file attributes, including Created / Modified Date.
  • and where to watch these headers, it's not ajax requests - heff
  • @heff, see any application for the keywords "http rest client". For example, in Chrome there is the addition "Advanced REST client" (I use it for direct work with headers). Similar additions / extensions are for MS Visual Studio (including for Code), IntelliJ IDEA. You can make an http call in python. - Manushin Igor