思路,通过ajax重新请求当前页面,用getAllResponseHeaders方法获取:
var req = new XMLHttpRequest();req.open('GET', document.location, false);req.send(null);console.log(req.getAllResponseHeaders());