| Welcome to WebmasterWorld Guest from 220.127.116.11 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Pubcon Platinum Sponsor 2014|
|cookies and sub-directories|
how to get cookies across directories
I've got an existing ecommerce site where all the product pages and buying pages are in the root directory.
The cookies that run the ecommerce side are consequently all set in the root directory.
The site is now being redeveloped and I want to use multiple directories for each of the product groups and another directory (but could be root) for the check and buy pages.
The problem I have is that the cookies get set afresh in each of the sub directories and the check and buy pages can't read them.
What I need is for the cookies to be set once in root and updated from the sub directory pages and then read from root by the check and buy pages.
Does anyone have any advice on how I might do this or a practical example of this I could look at so I know how to mode my existing system.
A cookie set to your specific domain with the path attribute set to '/' should be accessible to all the sub-directories within that domain. How are you setting your cookies?
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved