Cookie and Window.Open?

M

marc

Can you somehow make a new cookie in javascript code and then use that
cookie in a new http session using Window.Open? It does not seem to be
one of the parameters.

I could open the window as part of an URL with '&' like parameters as
an alternative I think, but I want to propogate login information from
one website to another 'sister' website.

So how can I open a new session and set the authorization cookie in
javascript? Is that at all possible?

Thanks in advance for any suggestions.
 
D

dalouis

When you set a cookie it is readable from any page within your site,
even if you do window.open. However the cookie will not be readable
from a different domain(website).

e.g. you set a cookie for www.mysite1.com you will *not* be able to see
this cookie on any page that runs on www.mysite2.com. So if you are
opening a window to mysite2.com from mysite1.com the cookie will not be
received. The only thing i could suggest is to set the cookie for
mysite1.com and then use the parameter in the url as you said, then on
the mysite2.com page reset the cookie for mysite2.com.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Set cookie in the browser following a Post request 1
Cookie check and redirect 3
window.open issue 5
Cookie Problems 1
window.open 1
Cookie encryption? 7
window.open 2
set cookie with javascript 1

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,227
Latest member
Daniella65

Latest Threads

Top