Basic use of session

Rails 3.1.3

I'm having difficulty understanding 'session', which is a way to
maintain some data even when the page reloaded (or jumped and came
back), if I understand it correctly.

Basically, what I wanna do is to simply keep an integer value, stored as
an instance variable, after jumping to another page and coming back to
where I was. But do so, by passing the value from one action to
another.

say I have an action,

def jump_to
  @order = 1234
  session[:value] = @order
end

this action, 'jump_to', redirects to a different page(different domain),
from which one can come back to the original domain but a new page,
having the action

def come_back
  @order = session[:value]
end

But @order seems empty. Maybe I am not defining the session value
properly.

Could anyone help me out?

soichi

Soichi Ishida wrote in post #1057926:

this action, 'jump_to', redirects to a different page(different domain),
from which one can come back to the original domain but a new page,
having the action

Sessions are NOT cross domain. That would be bad! You will need some
sort of Single Sign-On (SSO) if you want to maintain a session (actually
to synchronize data across the domains).

Two separate domains implies two separate apps, each with their own
independent sessions.

Thanks for your reply.
Maybe I have to think of a different way to achieve what I was trying to
do.