title: Is it possible to get the lastModified date of a file hosted on the server?
body: <p>With the code below I'm able to read, and log to the console, the contents of a file (myfile.txt) hosted on-line on the same folder/server as the HTML page with such code.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
  &lt;script&gt;
  
  async function doIt()
  {
    let response = await fetch("myfile.txt", {cache: "no-store"});
    let contents = await response.text();
    console.log(contents);
  }
      doIt();
  
  &lt;/script&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>My problem is that instead of the file contents I want to log the date/time when such file (myfile.txt) was last modified and I can't find the way to do it.</p>
  <p>What am I missing? Would it be possible? How?</p>
  <p>Many thanks in advance for any help!</p>