Jump to content
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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • 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.