You are probably in development mode and viewing the browsers cache. In
production mode, this shouldn''t happen, although there really is no way
to completely prevent it. Production mode sends the no-cache header, but
it''s up to the particular browser to decide whether to abide by that or
not.
-Bill
Luma wrote:> I''ve got the following problem with firefox:
>
> When I click the back button after logging out, I can see all the
> pages of the browser history where I was logged in. These pages are
> not reloaded, so I assume the before_filter is not called. How do
> other pages like groups.google.com avoid the browser history being
> displayed again?
>
>
> # before_filter for all methods that require the user to be logged
> in:
> def user_test_logged
> @user = User.find_by_id(session[:user_id])
> if @user.nil?
> redirect_to(:controller => "login" , :action =>
"login" ) and
> return false
> end
> end
>
> def login
> reset_session
> if request.post?
> user = User.authenticate(params[:name], params[:password])
> if user
> session[:user_id] = user.id
> redirect_to :action => ''index'' and return
false
> end
> end
> render :layout => false
> end
>
> def logout
> redirect_to :action => ''login''
> end
>
>
> thanks
> Luma
>
>
> >
>
--
Sincerely,
William Pratt
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---