unemployment Posted October 10, 2011 Share Posted October 10, 2011 Can you send a cookie through ajax? Will it still be read by the browser? Quote Link to comment Share on other sites More sharing options...
Psycho Posted October 10, 2011 Share Posted October 10, 2011 Not sure what you mean by sending the cookie through AJAX. You can read and write cookies through both JavaScript and PHP. So, there is no need to "send it through AJAX". Quote Link to comment Share on other sites More sharing options...
unemployment Posted October 10, 2011 Author Share Posted October 10, 2011 Maybe the question is better asked this way... Can you set a cookie in PHP in response to an AJAX request? Quote Link to comment Share on other sites More sharing options...
Psycho Posted October 10, 2011 Share Posted October 10, 2011 Maybe the question is better asked this way... Can you set a cookie in PHP in response to an AJAX request? Um, yeah. The fact that the PHP script is being initiated via an AJAX call is irrelevant as to what you can do in PHP. At least I can't think of anything that you can't do from an AJAX call that runs a PHP script than one that is run via a call from the browser's location bar. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.