moose-en-a-gant Posted February 4, 2015 Share Posted February 4, 2015 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? Quote Link to comment Share on other sites More sharing options...
cyberRobot Posted February 4, 2015 Share Posted February 4, 2015 Have you looked into using local storage (HTML5)? More information can be found here: http://www.smashingmagazine.com/2010/10/11/local-storage-and-how-to-use-it/ Quote Link to comment Share on other sites More sharing options...
moose-en-a-gant Posted February 4, 2015 Author Share Posted February 4, 2015 thank you that is great. I'll read up on that. Quote Link to comment Share on other sites More sharing options...
brotherZ Posted February 12, 2015 Share Posted February 12, 2015 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. Quote Link to comment Share on other sites More sharing options...
moose-en-a-gant Posted February 17, 2015 Author Share Posted February 17, 2015 I did increase it to a day. Thank you for your response. Quote Link to comment Share on other sites More sharing options...
jeffreyappel Posted March 15, 2015 Share Posted March 15, 2015 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. Quote Link to comment Share on other sites More sharing options...
charlesdavis Posted April 24, 2015 Share Posted April 24, 2015 Simple Increase the time of your session, you never get problem like that....Pls re check you coding and compile again...You will Succeeded. Quote Link to comment Share on other sites More sharing options...
asianmartt Posted June 25, 2015 Share Posted June 25, 2015 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.