Do all browsers support PHP $ _SERVER ['HTTP_X_REQUESTED_WITH']?

Are all PHP browsers supported $ _SERVER ['HTTP_X_REQUESTED_WITH']?

Are you aware of any browsers or times when $ _SERVER ['HTTP_X_REQUESTED_WITH'] does not work?

+6
ajax php
source share
2 answers

The sending of the X-Requested-With header really depends on the Ajax library used. I checked Prototype, jQuery, Mootools and YUI and they all installed it.

+11
source

I don’t think this particular header is the problem here - the only time I saw this with Ajax requests, and even in those cases it is usually a custom header given by the corresponding JavaScript library.

Does all browsers support custom request headers for XMLHttpRequest? As far as I know, yes, it works in all modern browsers.

0
source

All Articles