I am wondering what you guys are doing to detect whether your PHP
script is being called via AJAX or --- "regular?" (Do we have a
retronym for that in this brave new Web 2.0 world?).

I know Prototype sends a custom headers, e.g.

       [X-Prototype-Version] => 1.5.0
       [X-Requested-With] => XMLHttpRequest

so looking for those is obviously one way.

I found a discussion somewhere where someone simply suggested adding
something like isAjax=1 as a GET parameter in your Ajax call's URL.
Seems to work.

Thanks.

--
David Mintz
http://davidmintz.org/

En Nueva York el tránsito de la belleza a la desolación sucede siempre
expeditivamente, como si el principio universal de máxima eficiencia
hubiera aconsejado la supresión de gradaciones intermedias.

 -- Antonio Muñoz Molina, Ventanas de Manhattan
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to