JasonDavis
JasonDavis

Reputation: 48933

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

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

Do you know of any browsers or times where $_SERVER['HTTP_X_REQUESTED_WITH'] would not work?

Upvotes: 6

Views: 5280

Answers (2)

Paul Dixon
Paul Dixon

Reputation: 300845

Sending of a X-Requested-With header really depends on the Ajax library used. I checked out Prototype, jQuery, Mootools and YUI and they all set it.

Upvotes: 11

Jani Hartikainen
Jani Hartikainen

Reputation: 43243

I don't think this particular header is the issue here - the only case where I've seen this is with Ajax requests, and even in those cases it's usually a custom header set by the JavaScript library in question.

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

Upvotes: 0

Related Questions