Forum: Ruby on Rails Remove cache after logout

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
92f2fc730689ccce060a447a3ea485ab?d=identicon&s=25 News Aanad (Guest)
on 2011-06-01 19:15
(Received via mailing list)
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?
Bdf1f2ad97e7b9c9db1fa70e3cef48bf?d=identicon&s=25 Bryan Crossland (Guest)
on 2011-06-02 02:27
(Received via mailing list)
On Wed, Jun 1, 2011 at 12:14 PM, News Aanad <news.anand11@gmail.com>
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-p...

B.
92f2fc730689ccce060a447a3ea485ab?d=identicon&s=25 News Aanad (Guest)
on 2011-06-02 12:09
(Received via mailing list)
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.
6138e5dc89836289997c1cfe737e60e7?d=identicon&s=25 Asif Nauman (asifnauman)
on 2013-07-17 11:36
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.
6138e5dc89836289997c1cfe737e60e7?d=identicon&s=25 Asif Nauman (asifnauman)
on 2013-07-17 11:36
Thank You.
This topic is locked and can not be replied to.