View Full Version : Sessions, Cache and Forms

07-19-2008, 11:18 AM
I will try to explain my situation, my problem, and what i want.

My situation:
I am building a forum, something like this one, but of my own design, features and is linked to all websites in my company Shiftax. You will be able to get the exact examples if you think you need them, at www.shiftax.com/forum.php.

My problem:
When i submit a form, and it fails, or lets say, i want to switch my location via a jump box, without losing any of the form variables (with the same page loading).. then when i hit back the form has been cleared (because a new page has been loaded). I am having trouble doing this the exact way i see it in other websites.

I want:
I want to be able to go back and my form details will still be there, i have achieved this (woot victory), it seems i have finished my task. But now when i hit refresh, no new content is loaded onto the screen. I am building a forum like this which is ever changing with new content, a dynamic site if you will.

Here is the setting i am using before session_start();
ini_set('session.cache_limiter', 'private');

I learnt that session_start() loads cache information, read more here;

For this to work i had to remove my META tags setting no-cache rules.

Back to what i want:
After soaking up that information, you should understand.
I want my back button to hold the cache information.
I want my refresh button to get the information from the server again.

Can you help, because no other website has helped me so far?

07-19-2008, 11:44 AM
I continued my search and stumbled onto this answer.
//ini_set('session.cache_limiter', 'private');

Hope this helps if you have my problem.