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

> 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:
>
>> 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.
>>
>>
>>
>>
>> On 15 Peb, 15:47, Anurag Sachan <[email protected]> wrote:
>> > 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.
>>
>> --
>>
>>
>>
>
>
> --
> Thanks & Regards
> Anurag Sachan
> Trainee
> Torrid Networks Pvt. Ltd.
> PH:- +91-9560532987
>
>
> Add this code to ur application controller
>
 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

-- 
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 [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.

Reply via email to