HELP - Can I make a page FORCE a refresh?
I made a script for a customer that allows them to enter reports and post them (append) to an HTML page.
The problem is the customer isn't very sophisticated and when they return to the reports page they don't see the report they just posted. They don't know about the browser cache or to press the refresh button. They think it's a bug in the posting script. I'm sure the script is working properly.
Is there any way I can FORCE a brower refresh everytime someone views the reports page? IOW, any HTML or JavaScript command I can use to force the browser to do a refresh w/o the visitor having to manually click the refresh button?
Thanks!!
doublehelix posted this at 20:23 — 15th March 2002.
They have: 117 posts
Joined: Feb 2002
Try:
theprofessional posted this at 15:02 — 3rd April 2002.
They have: 157 posts
Joined: Mar 2002
With PHP:
Header("Location: http://thepage.html");
at the top or on the results page or whatever will reload the page. Experiment with it. It works.
ROB posted this at 17:20 — 3rd April 2002.
They have: 447 posts
Joined: Oct 1999
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
Mark Hensler posted this at 23:39 — 3rd April 2002.
He has: 4,048 posts
Joined: Aug 2000
Some docs to read...
http://www.w3.org » Hypertext Transfer Protocol -- HTTP/1.1:
13 Caching in HTTP
14 Header Field Definitions:
14.9 Cache-Control
14.21 Expires
14.32 Pragma
If you were to use PHP...
<?php
header(\"Cache-Control: no-cache\");
header(\"Programa: no-cache\");
header(\"Expires: Thu, 01 Dec 1994 16:00:00 GMT\");
?>
If you want to use META tags, use the code Howard Stern provided.
Mark Hensler
If there is no answer on Google, then there is no question.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.