I guess what I'm looking to do is mark pages expired, so when you back 
up you get either an expired message or an automatic reload. But I'm not 
sure this is necessary and hope to avoid it. Would be good to know how 
to do it, though.

There's a pretty interesting discussion about caching here:

http://www.mnot.net/cache_docs/#CONTROL

There's also a discussion here...

http://forums.asp.net/p/1013531/1898631.aspx

(using ASP.net) and they suggest the following:

AppendHeader("Cache-Control", "no-cache; private;
   no-store; must-revalidate; max-stale=0; post-check=0;
   pre-check=0; max-age=0"); // HTTP 1.1

AppendHeader("Pragma", "no-cache"); // HTTP 1.1

AppendHeader("Keep-Alive", "timeout=3, max=993"); // HTTP 1.1

AppendHeader("Expires", "Mon, 26 Jul 1997 05:00:00 GMT"); // HTTP 1.1

Hope that helps.

Chas.

David Pollak wrote:
> Charles,
> 
> Lift is supposed to mark all pages as non-cached.  If it's not doing 
> that, then there's a defect in Lift.
> 
> Can I ask that you give me a list of things I can send to the browser 
> (headers, meta-tags, etc.) that will indicate that the browser should 
> not cache the page.  I'll insure that all those things are sent.
> 
> Thanks,
> 
> David
> 
> On Wed, Dec 10, 2008 at 11:23 AM, Charles F. Munat <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>> wrote:
> 
> 
>     Actually, I have a multi-page survey that updates the database when you
>     change each field (there are no submit buttons). It works pretty well,
>     but if the user backs up to a page after many changes have been made...
> 
>     I'm not sure I'll do anything more than just tell them not to use the
>     back button on the forms, but it might be better to force a reload of
>     the page where possible. If I can expire it in the cache (or prevent it
>     from being cached), then that should eliminate the problem.
> 
>     That's my thinking anyway.
> 
>     Thanks for the tip.
> 
>     Chas.
> 
>     Tim Perrett wrote:
>      > Chas,
>      >
>      > Look in HttpResppnse.scala - you'll see the LiftResponse subclasses
>      > that are setting custom headers and things. Also see TextResponse etc
>      > for more examples ( all in net.liftweb.http )
>      >
>      > I'm guessing you need this for some API or such?
>      >
>      > Cheers
>      >
>      > Tim
>      >
>      > Sent from my iPhone
>      >
>      > On 10 Dec 2008, at 02:00, "Charles F. Munat" <[EMAIL PROTECTED]
>     <mailto:[EMAIL PROTECTED]>> wrote:
>      >
>      >> I want to (attempt to) prevent the browser from caching certain
>      >> pages as
>      >> there is a problem if the user backs up to them. I can do this with
>      >> HTTP
>      >> headers, of course.
>      >>
>      >> Question: Is this functionality built-in to Lift? I could find
>     nothing
>      >> on the wiki. If not, how does one set the HTTP headers on a page
>     (and
>      >> from where)?
>      >>
>      >> Thanks.
>      >>
>      >> Chas.
>      >>
>      >
>      > >
> 
> 
> 
> 
> 
> -- 
> Lift, the simply functional web framework http://liftweb.net
> Collaborative Task Management http://much4.us
> Follow me: http://twitter.com/dpp
> Git some: http://github.com/dpp
> 
> > 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" 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/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to