tags:

views:

52

answers:

2

I need to deal with these two cases differently,is there a good solution?

+4  A: 
if ($_SERVER['HTTP_X_REQUESTED_WITH'] === 'XMLHttpRequest') { /* ajax request */ }
Sergei
Dunno how reliable that is though...
Mark
it's reliable and pretty standard.
Sergei
+3  A: 

I can think of 2 ways to accomplish this:

Asaph