Click to See Complete Forum and Search --> : Javascript and Cookies


latnem
11-25-2002, 07:11 PM
I'm currently working on a website that uses JavaScript extensively. Unfortunately I dont have many JS bones in my body and require some help.

Problem:
The site I'm working uses cookies to store shopping cart information. I need to swap protocols and domains to move into an SSL environment. When I do this the data in the shopping cart isnt carried across. Is there a way in which the cookie can be read by 2 different URLs? eg. http://thesite.com and https://secure.com/thesite/ (fictitious domains).

Beach Bum
11-25-2002, 07:33 PM
a cookie is by definition site specific. i don't think there is a way to trick the system (so to speak).

latnem
11-25-2002, 07:45 PM
Is there a way to write the cookie or cookies as the case may be to both urls....or is there a way of parsing the cookie information in the url?

Charles
11-25-2002, 08:01 PM
The path cookie parameter is what you want. See http://developer.netscape.com/docs/manuals/js/client/jsref/cookies.htm.

Beach Bum
11-25-2002, 09:53 PM
guess i spoke too soon. learn something new all the time in this forum.