Javascript back or rails way to go back a window?


#1

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


#2

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?


#3

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.