Is it possible to use jQuery’s $.post function and have the cookies set in the browser? I’m trying to set it up so that it is possible for my users to be automatically logged in to a certain site by sending POST variables.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To answer your question, yes, you can make an ajax call and have the server set the necessary session/authentication cookies.
You could also POST via $.ajax which may give you a little more (but maybe not needed) control over the event. For example: