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
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?