Jump to content

Archived

This topic is now archived and is closed to further replies.

moose-en-a-gant

how to cache?

Recommended Posts

I'm not sure if this is the appropriate forum to post about this although I chose HTML because of input of a form

 

I want to cache what I have written in the event of a username session timeout, which is what I'm facing now, I'm writing a lot of stuff, when I finally push "submit" my session username is gone and the data disappears even when I hit back.

 

I've seen this cache on a few forums and even yahoo answers

 

I need this function

 

How do I achieve it or what do I look at?

Share this post


Link to post
Share on other sites

Why don't you increase the user session timeout? Or generate a popup message using javascript when the user session is about timeout and ask the user if he needs more time. This is what I have seen done.

Share this post


Link to post
Share on other sites

trying adding these headers to the top of the page:

header("Cache-Control: private, max-age=10800, pre-check=10800");
header("Pragma: private");header("Expires: " . date(DATE_RFC822,strtotime("+2 day")));

if the form submits and post data to a second page, you may want to put it at the top of both pages. also, make sure the code is after any session_start(); if you are using sessions.

Share this post


Link to post
Share on other sites

Simple Increase the time of your session, you never get problem like that....Pls re check you coding and compile again...You will Succeeded.

 

Share this post


Link to post
Share on other sites

Caching is an incredible sample of the universal time-space tradeoff in programming. You can spare time by utilizing space to store results.

Program: Yo! You got index.html?

Server: (Looking it up… )

Disjoin: Totally, fella! It's right here!

Program: That's rad, I'm downloading it now and demonstrating the client.

(The real HTTP convention may have minor contrasts; see Live HTTP Headers for more points of interest

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.