Oh right, so what could I use as a unique identifier so I can mimic a session using the modRegistry tool? I can't use just the IP address as this could be shared across multiple computers on a local network, so is there another unique number or string I can use instead?
-
☆ A M B ☆
- 24,524 Posts
Use the user's email address, or a combination of his username, email and user ID. Something unique to the user.
The user doesn't log in, they just browse through the websites adding products to their basket, so if I were to use this method I need to find a unique identifier that isn't the user personal details. Can this be done, or should I go back to looking at the localStorage option?
-
☆ A M B ☆
- 24,524 Posts
IP address along with a time range? i.e. IP address + timestamp, and if the timestamp part is within the last 20 minutes or so it's used for the identifier? Establish a unique string and pass it in the URL or with a hidden field; it would be much less of a security problem than using the session ID in the same way, since even if somebody does sniff the URL it won't give them anything sensitive.
But if the unique identifier is a timestamp, would I then have to continually rename the topic with new timestamps, otherwise after 20 minutes the data will no longer be available, regardless of whether the user has actively been on the site or not? I understand only having data available for 20 minutes of inactivity, but it strikes me there would be a lot of work involved in getting this to work like a session where the data remains for as long as the user is active.
I'm erring more towards the localStorage option again, as it seems I can have a page on the main domain to act as the "data server". I'm thinking to have a page on the main domain with a whitelist of all the domains in question, then whenever someone visits a page n any of the sites it includes an iFrame that visits the "data server" page and retrieves info. This sounds like similar to one of my attempts to get sessions to work across domains, but using localStorage instead.
I just hope I can ping AJAX requests to the data server page too, so I can update the basket as the user adds/removes items from the basket.
I will update this page to let you know if this works, for anyone else with a similar problem...