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. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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 <anuragsacha...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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 < christianbautista.info-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 <anuragsacha...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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. > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- Thanks & Regards Anurag Sachan Trainee Torrid Networks Pvt. Ltd. PH:- +91-9560532987 -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Wed, Feb 15, 2012 at 2:19 PM, anurag sachan <anuragsachan07-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>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 < > christianbautista.info-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 <anuragsacha...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
pls find this attachment and use this code and pls tell me what the problem is there http://www.adrive.com/public/be4fc1d8c4a3989fe5e9c161508220ae91f812ae2eccf3f013811eb81beb9ab9.html On Wed, Feb 15, 2012 at 4:03 PM, Muruga <murugu2012-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On Wed, Feb 15, 2012 at 2:19 PM, anurag sachan <anuragsachan07-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>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 < >> christianbautista.info-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 <anuragsacha...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 >-- Thanks & Regards Anurag Sachan Trainee Torrid Networks Pvt. Ltd. PH:- +91-9560532987 -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.