Hi, I have observe Facebook and Gmail that when we logged out it redirects us to the login page, but the interesting is that when we hit back button it still not go to inbox page. I have search in google and got something to set attribute "Cache-control" in header. But I don''t know how can we implement this mechanism in Rails. Can anybody suggest me how to do that? -- 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, Jun 1, 2011 at 12:14 PM, News Aanad <news.anand11-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > I have observe Facebook and Gmail that when we logged out it redirects us > to the login page, but the interesting is that when we hit back button it > still not go to inbox page. > I have search in google and got something to set attribute "Cache-control" > in header. > But I don''t know how can we implement this mechanism in Rails. > Can anybody suggest me how to do that? > >The step by steps are in the answer. http://stackoverflow.com/questions/711418/how-to-prevent-browser-page-caching-in-rails B. -- 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.
I have tried that but it still not working. I have tried code in application controler: 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"] = "0" end I am using Extjs framwork to design my web page. On Thu, Jun 2, 2011 at 5:54 AM, Bryan Crossland <bacrossland-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> On Wed, Jun 1, 2011 at 12:14 PM, News Aanad <news.anand11-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: > >> Hi, >> I have observe Facebook and Gmail that when we logged out it redirects us >> to the login page, but the interesting is that when we hit back button it >> still not go to inbox page. >> I have search in google and got something to set attribute "Cache-control" >> in header. >> But I don''t know how can we implement this mechanism in Rails. >> Can anybody suggest me how to do that? >> >> > The step by steps are in the answer. > > > http://stackoverflow.com/questions/711418/how-to-prevent-browser-page-caching-in-rails > > B. > > -- > 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. >-- 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.
News Aanad wrote in post #1002733:> I have tried that but it still not working. > I have tried code in application controler: > > 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"] = "0" > end > > I am using Extjs framwork to design my web page.Hi Code is working fine.Thank you.You saved a lot of time. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/8d80ae5c7e987fc2ab2e8552cd6b79e1%40ruby-forum.com. For more options, visit https://groups.google.com/groups/opt_out.
Thank You. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/3dec55c6bc203b57b7dc8e340099870a%40ruby-forum.com. For more options, visit https://groups.google.com/groups/opt_out.