Log-in Logout application

I have created a application of log-in and logout using session. but
when i click on logout. then i saw a page that says “you are logged
out”.
But the problem is that if i click the back button of my browser, then
it redirect me to the previous page. so how can i prevent from this
situation. My session is working fine because when i refresh my page
then the login screen appear.

Yes, maybe your session is working fine…

But you need to add more…
example…

if your session is nil? or blank?
render something.
or redirect to a page you want to be seen.

may there is problem of browser cookies. Is there any way to clear the
cookies when we click on logout??

On Wed, Feb 15, 2012 at 2:05 PM, Christian Bautista <
[email protected]> wrote:


You received this message because you are subscribed to the Google G.
“Ruby on Rails: Talk” group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.


Thanks & Regards
Anurag S.
Trainee
Torrid Networks Pvt. Ltd.
PH:- +91-9560532987

On Wed, Feb 15, 2012 at 2:19 PM, anurag sachan
[email protected]wrote:

example…

when i click on logout. then i saw a page that says "you are logged

It will tell the browser not to cache this page.

before_filter :set_cache_buster
def set_cache_buster
response.headers[“Cache-Control”] = “no-cache, no-store, max-age=0,
must-revalidate”
response.headers[“Pragma”] = “no-cache”
response.headers[“Expires”] = “Fri, 01 Jan 1990 00:00:00 GMT”
end

pls find this attachment and use this code and pls tell me what the
problem
is there

On Wed, Feb 15, 2012 at 4:03 PM, Muruga [email protected] wrote:


PH:- +91-9560532987
response.headers[“Pragma”] = “no-cache”
response.headers[“Expires”] = “Fri, 01 Jan 1990 00:00:00 GMT”
end


Thanks & Regards
Anurag S.
Trainee
Torrid Networks Pvt. Ltd.
PH:- +91-9560532987