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? Link to comment https://forums.phpfreaks.com/topic/248822-cookie-through-ajax/ 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". Link to comment https://forums.phpfreaks.com/topic/248822-cookie-through-ajax/#findComment-1277848 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? Link to comment https://forums.phpfreaks.com/topic/248822-cookie-through-ajax/#findComment-1277859 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. Link to comment https://forums.phpfreaks.com/topic/248822-cookie-through-ajax/#findComment-1277862 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.