开发者

CORS xmlhttprequest HEAD method

When requesting header data using HEAD method with CORS object, it returns null.

getAllResponseHeaders() -> return null.

How to setup php headers in the o开发者_如何学编程ther site so that I can retrieve header data>

p.s.: this is not within the same domain. it's a cross origin resource sharing

Thank you


I've noticed this behavior in Firefox (3.6.13); getAllResponseHeaders() returns nothing. In Chrome/Safari, getAllResponseHeaders() only returns simple response headers (as defined in the spec http://www.w3.org/TR/cors/#terminology). None of these browsers respect the Access-Control-Expose-Headers header.


Since the last answer to this question, modern browsers respect the Access-Control-Expose-Headers header.

This bug is fixed in up to date versions of IE (11) and Chrome (43) and Firefox (39).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜