title: Javascript get last modification of a web page
body: <p>I am trying to create a javascript function which returns the last modified date of a remote url which it recieves. I have tried many different methods, none of which seem to work. The following code seems like it may be close, but unfortunately doesnt work.</p>
  
  <pre><code>function getlastmod(url) {
      var req = new XMLHttpRequest();
      req.open("GET", url, false);
      req.getResponseHeader("Last-Modified");
      req.send("");
      return req.responseText;
  }
  </code></pre>
  
  <p>The function will be used in a chrome extension that I am making.
  Thanks for any help-Josh</p>