Welcome Guest, Not a member yet? Register   Sign In
trouble with is_ajax_request()
#2

X-Requested-With is set only by AJAX libraries like jQuery, Mootools, Prototype etc.

If you're using a custom AJAX handler and want this functionality, you can trigger the request header by adding
the following AFTER you've opened the request with .open():

xmlHttpRequestObject.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
trouble with is_ajax_request() - by richb201 - 01-24-2019, 11:07 AM
RE: trouble with is_ajax_request() - by InsiteFX - 01-25-2019, 04:28 AM
RE: trouble with is_ajax_request() - by richb201 - 01-25-2019, 06:56 AM
RE: trouble with is_ajax_request() - by richb201 - 01-26-2019, 12:42 AM
RE: trouble with is_ajax_request() - by InsiteFX - 01-26-2019, 06:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB