jucat
01-29-2003, 07:23 AM
hello , i'm new to php, and am learning via a book, i have done some examples, and the problem i am having is trying to get a page to refresh itself, as i have created a guestbook, after a new record has been inserted, it goes back to the main page, where one can view the messages, but the new message is not loaded, but if i refresh the page it gets loaded, how can i do the refresh automatically, if anyone can help, it would be great.
Sounds like your browser may be caching the page...try placing:
<META http-equiv="Pragma" content="no-cache">
in the <HEAD> section of your page....
ccollins
02-05-2003, 10:14 AM
jucat,
you could also, assuming you are using
header("Location: http://www.whatever.com/MainPage.php"); instead use
header("Location: http://www.whatever.com/MainPage.php?cache=".rand());
this will (almost) always give a slightly different url each time. This should require the browser to load the page from the server, instead of from the cache.
-ccollins
vBulletin v3.0.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.