# How to pass session cross different domains?

**URL:** <https://www.ruby-forum.com/t/how-to-pass-session-cross-different-domains/187571>\
**Category:** Rails\
**Created:** [April 26, 2010, 4:28am UTC](https://www.ruby-forum.com/t/how-to-pass-session-cross-different-domains/187571 "2010-04-26T04:28:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 26, 2010, 4:28am UTC](https://www.ruby-forum.com/t/how-to-pass-session-cross-different-domains/187571/1 "2010-04-26T04:28:44Z")

</div>

Now i am working on an cart application, when i add an item to cart(in  
the  
domain of [http://www.example1.com](http://www.example1.com)), and then checkout(in the domain of

[https://www.example2.com](https://www.example2.com)), i still want to get the item from the cart. I  
used the plugin of ssl requirement, and i append the host and session\_id  
into

the checkout url, as  
[http://www.example2.com/checkout?host=www.example1.com&session\_id=xxxxxxxxxxxxxxxxxxxxx](http://www.example2.com/checkout?host=www.example1.com&session_id=xxxxxxxxxxxxxxxxxxxxx)).Whencheckout  
it would redirect to

[http://www.example2.com/checkout?host=www.example1.com&session\_id=xxxxxxxxxxxxxxxxxxxxx](http://www.example2.com/checkout?host=www.example1.com&session_id=xxxxxxxxxxxxxxxxxxxxx).  
Now the problem i could not get the data from the session.

Further more, i used memcached as session store. Is there anyone met  
this  
problem ever?
