I would design my cart widget so that it does not require multiple pages that way it stays memory resident. The entire cart workflow would exist in a shopping cart widget. Further we designed a routine that wires into the page load and unload that does the following. Any data marked as persitable is stuffed into client side storage (we use Dojo so it figures out where it can store stuff, Cookie, Flash, IFrame). The routine looks for stuff stored in this segment when a page loads and pulls it back into memory and flushes the data from storage. On unload it repeats the process of serializing marked data. If you absolutely need a multi-page model you can use a similar pattern.
Interesting. I was thinking about using something like a hidden frame. Some StackOverflow posts mention storing data in "window.name". But we need something secure to store the user auth token...
You should consider using one of the toolkits, many of them have something akin to Dojo's storage http://ajaxian.com/archives/dojostorage-offline-access-and-p... . This buffers you from the implementation details and as newer browsers come along they are able to update the implementation to take advantage of newer browsers built in databases, while providing you with the same backwards compatible API. If you have not chosen one, I recommended you take a look at Dojo, if you are going to build a full on web app and jQuery if you have lighter requirements.
Side note: we are really starting to side track this thread, why don't you email me (in my profile) or add me to your contacts in Skype (if you use Skype) that way you can hit me up on any questions you have.
I did send an email yesterday, the title is "Your approach to web development. I realize now that the title might look like SPAM :) Anyway those questions were answered, I'll send you another one.
I'm trying to understand: how can you keep a Javascript object (the Cart array, lets say) between pages?