tags:

views:

920

answers:

2

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?

A: 

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.

Jani Hartikainen
+5  A: 

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.

Paul Dixon