Ajax, the Back button, and Sweepers

Hoping somebody might help save me a few days here… :wink:

My little app depends heavily on RJS. Visitors using the back button
see the page that originally loaded, not the one s they left it

According to the W3C RFC 2616 document, the Cache-Control header is the
one that controls caching on the client (and
intermediate proxies). It says… " If the no-cache directive does not
specify a field-name, then a cache MUST NOT use the response to satisfy
a subsequent request without successful revalidation with the origin

All the error pages I get from Rails have a Response section at the
bottom with a line that reads ‘Headers: {“cookie” =>[],
“Cache-Control”=> “no-cache”}’. So I’m guessing / hoping that a Sweeper
expires the version on the server and so, when the client does the
‘revalidation with the origin server’, forces a reload.

There also seems to be the option of just expiring fields instead of the
entire page. That would be ideal. But, of course, the documentation is
a little sparse :wink: So I’m hoping someone who’s worked with Sweepers
will see this and maybe help me understand what I need to do.


Best regards,

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs