Sunday, 15 August 2010

ENABLE form caching in HTML/PHP -



ENABLE form caching in HTML/PHP -

i going little crazy here trying find solution pretty straight forward.

i have grouping of reports on intranet (not accesible outside world) , each study has input form has bunch of html inputs vary study data.

problem beingness when nail form study form reset it's original state. want cache (remember html input variables) , can find how turn caching off, want on! prefer not $_session , $_cookie storing have 120 reports 10 or inputs each, going take forever store of them , re-load variables on refresh.

i not server administrator, beleive running apache 2.2 web server. these php/html based pages. advice great!

it not browser other forms beingness cached. more looking modules on server need activated allow caching , notes should set in header of forms allow caching. intranet runs through proxy thinking need cache-control public.

edit:

when run form page, http headers show me sense should changed:

(under response headers)

x-powered-by: php/5.3.3 via: *[removed]* server: apache/2.2.3 (red hat) proxy-connection: keep-alive pragma: no-cache expires: thu, 19 nov 1981 08:52:00 gmt date: wed, 13 feb 2013 23:33:32 gmt content-type: text/html; charset=utf-8 content-length: 5191 connection: keep-alive cache-control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0

i have feeling need alter cache-control , pragma values. know how acheive this?

trying adding these headers top of page:

header("cache-control: private, max-age=10800, pre-check=10800"); header("pragma: private"); header("expires: " . date(date_rfc822,strtotime("+2 day")));

note: if form submits , post info sec page, may want set @ top of both pages. also, create sure code after session_start(); if using sessions.

php html forms caching

No comments:

Post a Comment