On Sun, Feb 7, 2010 at 5:08 PM, gazza <[email protected]> wrote:
> Hi,
>
> Much appreciated the answer. I basically dont want any past data
> entered in my forms to reveal themselves in future
> i.e credit card information for example. What I am seeing is that is
> that when I pull up my form (running 0.9.7 pylons on linux)
> I dont see the past information that was entered but what is happening
> is when the first character in this form then past possible matches
> appear
> in that field.
>
> I want to remove any past possibilities appearing. This may be a linux
> setting as opposed to a pylons setting I dont know:
>
> I know windows has something like:
>
> <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
> <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
> <META HTTP-EQUIV="expires" VALUE="0">

These are an HTTP standard. You can set them on the response object in
the action.  There's ``response.headerlist`` list, a
``response.headers`` dict, and some headers have their own attribute.
I think setting any of these will affect the others.  From the WebOb
manual:

>>> # Set the cache-control header:
>>> res.cache_control.max_age = 360
>>> res.cache_control.no_transform = True

http://pythonpaste.org/webob/reference.html#id3

Doesn't Cache-Control default to no-cache' in web applications,
because it assumes the page is dynamic and may never be the same
again.

You may be observing a different phenomenon, where the browser saves
the values input into forms, and offers to re-enter them later if the
form looks similar enough. This is not related to the cache settings.
It's related to the form-data preference. In Firefox/Linux, go to Edit
menu, Preferences, Privacy, and uncheck "Remember what I enter in
forms and the search bar".  Then go down to "Private data / Clear
Now", check only the "Saved Form and Search History" box, and press
"Clear Private Data Now".

-- 
Mike Orr <[email protected]>

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

Reply via email to