Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-05-2007, 11:18 PM   PM User | #1
Zurvan
New Coder

 
Join Date: Aug 2007
Posts: 25
Thanks: 1
Thanked 4 Times in 4 Posts
Zurvan is an unknown quantity at this point
How to force Refresh?

I have a unique problem. I basically need to have a certain page reprocess the php when it's accessed by either the forward or back buttons. The current (default) behaviour has it just reload the page from the cache, as normal. This will not work for our purposes - it must reload completely. We need the php & database access on every load of this page, and that's currently not happening.

I'm totally lost as to how to make this happen. Does anybody have a suggestion for me? Even something to look for would help.

Thanks in advance.
Zurvan is offline   Reply With Quote
Old 08-05-2007, 11:25 PM   PM User | #2
meth
Regular Coder

 
meth's Avatar
 
Join Date: Jan 2003
Posts: 262
Thanks: 0
Thanked 9 Times in 9 Posts
meth is on a distinguished road
Best to prevent caching then.

<?php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', FALSE);
header('Pragma: no-cache');
?>
__________________
I do Web Design, Brisbane based.
More time spent in PHP/MySQL Web Development.
And Search Engine Optimisation takes up the rest of it.
meth is offline   Reply With Quote
Old 08-06-2007, 06:10 PM   PM User | #3
Zurvan
New Coder

 
Join Date: Aug 2007
Posts: 25
Thanks: 1
Thanked 4 Times in 4 Posts
Zurvan is an unknown quantity at this point
Thanks meth. That works perfectly.
Zurvan is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:56 PM.


Advertisement
Log in to turn off these ads.