-->

jquery - get http headers

2019-07-17 23:23发布

问题:

How do you get the http headers passed on a page? Is this achievable via javascript/jquery? I'm looking into something like this: http://www.mulliner.org/pc.cgi

回答1:

There is no api to get the headers for the current page. The best way to approach this is to make an ajax call to the current page and read them as described in this question.

Accessing the web page's HTTP Headers in JavaScript