RyanSF07 Posted August 6, 2011 Share Posted August 6, 2011 Hi All, I have a question regarding headers. Currently I'm using a php function that creates the html header: "Cache-control: private" on pages inserting or retrieving content from the database. I don't think this is the correct header to be using and I'm confused about which is the best fit. The site I'm working on relies solely on session variables. No cookies are ever set. There are quizzes -- the users' selected answers are compared to actual answers in the DB when the user clicks to see the results. I've noticed that when a quiz sits in a browser for 15 to 30 minutes before the user clicks to see the results, that sometimes totally random results appear -- as if the site had timed out, then sent a random "hey show me some results" request to the server, but the server didn't know which quiz we were on. I'm googling myself in circles over these: cache control: No-store cache control: max-age cache control: must-revlidate cache control: proxy-revalidate cache control: max-age or should I instead use the "session_cache_limiter()" function? If you have advice on which is the best fit and how/why -- Please let me know. Thank you very much for your help. Ryan Quote Link to comment Share on other sites More sharing options...
RyanSF07 Posted August 6, 2011 Author Share Posted August 6, 2011 My code checks to see if the session userid is set, and if not throws an error. So.. which header best does this: - check to see if session has timed out - if not, perform the query - if so, the query is not performed and the "$sorry_error" is thrown thanks again for your advice.. 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.