6

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?

JasonDavis
  • 48,204
  • 100
  • 318
  • 537

2 Answers2

11

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.

Community
  • 1
  • 1
Paul Dixon
  • 295,876
  • 54
  • 310
  • 348
0

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
  • 42,745
  • 10
  • 68
  • 86