Just pushed these changes live: http://github.com/dpp/liftweb/commit/c3d2ec803d0dc1f9aa205be5cbf9c4d327af99c2
Please let me know if Lift is doing the right thing (tm) in terms of never caching a page. On Wed, Dec 10, 2008 at 1:27 PM, Charles F. Munat <[email protected]> wrote: > > 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 > > > > > > > > > -- 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 -~----------~----~----~----~------~----~------~--~---
