Pat Allan wrote:

Nate, not that I want to rain on your parade, but I *think* IE cannot be relied upon to send the referrer back to the server (depending on settings/versions/who-knows-what it may think it's a security risk). It's been a while since I looked into it, though.

When I'm handling logins and then redirects-on-success, I track the last-visited-page in the session (excluding POSTs, session-related pages, etc), and redirect to that instead, rather than using HTTP_REFERER. Not sure if that's any help in your situation though.

And all that said, it really has been a few years since I hit this problem with IE. I could be wrong.


I think you are right. This post touches on that:
http://www.ahabman.com/blog/2008/06/rails-redirect_to-back-in-internet-explorer/

Setting a session variable does indeed seem like the best way to make use of the last-visited page, as described here:
http://blog.edendevelopment.co.uk/2009/04/02/redirect_to-back-not-reliable/

I should clarify that the Comments extension is only using 'redirect_to :back' in the admin comments_controller after comments are approved, unapproved or destroyed. As long as the admin avoids IE or makes sure that referers are not disabled if using FF then it shouldn't be a problem. I was encountering the error because FF was set up to block referers. Once I changed that, everything wored perfectly.



~Nate

_______________________________________________
Radiant mailing list
Post:   [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to