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.
5d3b058e892ec1e987a60c0b39665581?d=identicon&s=25 mixplate (Guest)
on 2007-04-17 20: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
D69d23d8e811e8ab2a8593380d6ede63?d=identicon&s=25 Jeff Emminger (jemminger)
on 2007-04-17 22: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?
525128e48ca2b4c7fb6176ea166fccfd?d=identicon&s=25 Eric G. (gotskill10)
on 2007-04-18 02: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.