0
var script = document.createElement('script');
script.src = "https://code.jquery.com/jquery.js";
document.documentElement.appendChild(script);

I load it, But I wish to know response headers of loading script:

date: Sun, 26 Feb 2017 00:00:00 GMT
etag: "хххх"
status: 200

Do you know ways to get such data?

  • Not sure if this is a true duplicate, but I'd suggest looking at http://stackoverflow.com/questions/220231/accessing-the-web-pages-http-headers-in-javascript (from quick read, seems answer is you can't for the way you're doing it) – Foon Feb 26 '17 at 12:28
  • But. It's different. In that subject It uses ajax, doesn't load a script. – Alexey Lebedev Feb 26 '17 at 12:31
  • Hence the not flagging as duplicate but pointing out that the link exists – Foon Feb 26 '17 at 12:38

0 Answers0