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