Forum: Ruby on Rails javascript back or rails way to go back a window?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
mixplate (Guest)
on 2007-04-17 22:04
hi. i am using acts_as_ferret for my application. when i search for
something, and then click on the result, i have a back
button(javascript:history.back) that should take the user back the
listing page. however, i get the "Warning: Page has Expired". is there a
rails way to perform the back action? or is this just a IE issue

thanks
Jeff E. (Guest)
on 2007-04-18 00:19
(Received via mailing list)
disclaimer: i have not used acts_as_ferret

how about saving the last search as a session var, then have your
'back' button be a link to the search page, and pre-populate it with
the last search session var if it exists?
Eric G. (Guest)
on 2007-04-18 04:26
Jeff's solution is good, or you can try to redirect them to.

request.env['HTTP_REFERER']

You'd be surprised what you can find in the request headers.
This topic is locked and can not be replied to.