Skip to content

Instantly share code, notes, and snippets.

@MatthieuScarset
Created March 15, 2016 09:12
Show Gist options
  • Save MatthieuScarset/1d2005a41e4c544ca72a to your computer and use it in GitHub Desktop.
Save MatthieuScarset/1d2005a41e4c544ca72a to your computer and use it in GitHub Desktop.
Get current page's header in Javascript
var req = new XMLHttpRequest();
req.open('GET', document.location, false);
req.send(null);
req.getResponseHeader('Date');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment