Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.

Ajax Login Cookies

Skip to first unread message


Mar 18, 2009, 10:07:05 PM3/18/09

Is there a safe and secure way to set cookies though an ajax
XMLHttpRequest call (or something similar)? The idea is that I wan to
have a login form that uses ajax to make the https call to the server,
then return the login cookies. Is this best done using a hidden

I know I could use a setCookie client side javascript function,
however, I don't think this would be very secure (vs. a page load
where the cookies are sent in the header). You can assume that the
cookie info being set is properly salted, encrypted, etc. The
emphasis here would be on security as well as the act of actually
setting the cookies so they can be made available for the following
call to the server without navigating away from the page.

Is there another standard way to do this using ajax?


0 new messages