Going back doesn't always go, well, back

Addendum to my prior entry.

Rails scaffold creates the index, show, edit, update, destroy, create
views.

But Rails does not provide a correct “back” method to get to the right
spot in the index listing. Example: Index view lists 387 lines of items
from SQL file. But using ‘back’ in show, edit, etc only goes back to TOP
of a new index.

Using <%= link_to ‘Back’, items_path %> ONLY goes back to top of index
view pg.
I.e, reloads it all over again

Browser button goes back to correct point in index, you see page exactly
where you were: top, bottom or WHEREVER IN BETWEEN.

‘Redirect_to :back’ Rails helper won’t work with <%= link_to ‘Back’, …
%>

Also, response.env[‘HTTP_REFERRER’] works like ‘link_to’ - redoes index
from top.

Must use Javascript:history.go(-1) in a link construct. <a …>Back
or the browser “Back” button/context menu choice.

Why can’t rails just correctly go back one page with ‘redirect_to
:back’?

As it is ‘Back’ in Rails ‘link_to’ seldom works (Unless, of course, you
only stay at the top of the page and do nothing. Rather useless, huh?)

Sorry for the frustration.

Love Rails otherwise.

All better solutions and explanations welcomed. Can someone clear this
up for me? Maybe I am not seeing things the “Rails” way? “RESTful” way?

Many thanks.

Browser button goes back to correct point in index, you see page exactly
where you were: top, bottom or WHEREVER IN BETWEEN.

The browser’s back button makes no request to the server it simply pulls
the page back from it’s local cache. A link on a page regardless of what
it’s called makes a request.

‘Redirect_to :back’ Rails helper won’t work with <%= link_to ‘Back’, …
%>

Making a request causes a page to refresh (unless it’s an AJAX request).

This is just how the web works, it has nothing to do with Rails in
particular.

All better solutions and explanations welcomed. Can someone clear this
up for me? Maybe I am not seeing things the “Rails” way? “RESTful” way?

Pagination and AJAX have been the best solutions for this particular
issue so far. The browser back button is the bane of web application
development. In more ways than just this particular issue. This is
exactly why AJAX is becoming so popular. It’s not really that AJAX is
such a fantastic solution, it’s just the best workaround we have for a
system that was not designed for running applications.