Click to See Complete Forum and Search --> : Very weird refresh problem.


Davidc316
03-24-2006, 04:29 PM
Can anyone offer any help with the following?:

I have made the following two very simple scripts/webpages...


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<META HTTP-EQUIV="Refresh" CONTENT="3; URL=pageb.php">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
here is page A


...and also...


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<META HTTP-EQUIV="Refresh" CONTENT="3; URL=pagea.php">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
here is page B


When I open up IE and view any one of these pages, they bounce off each other quite happily (META refresh working ok). However, as soon as I hit the refresh button on one of the pages they stop refreshing.

I'm totally stumped! :confused:

Houdini
03-24-2006, 05:08 PM
Interesting and never thought about it, but I think what happens is that the headers are not sent on a user refresh so what ever page you are on at the time and the refresh just refreshes the actual content of the page and not the headers, of course thiss could be all wrong and until I tested your script then I had never even thought about such usually what you are doing is kinda like a one time thing when you might have moved most of your content elsewhere.

Davidc316
03-24-2006, 05:28 PM
Thanks.

The code in question will be used on a series of webpages that are to be displayed on a 38" plasma screen that is wall mounted in a sales office at my work displaying live readouts of how many leads the website is generating. I suppose it is indeed a one off but for me it's a very important one off. All in all the thing works ok, but when the sales manager hits the refresh button (and he does several dozen times a day) then the whole refresh sequence dies and my scripts are rendered useless.

If you take the two pieces of code that I posted into Notepad and just save each one as pagea.php and pageb.php then you'll be able to run them and (maybe) see for yourself what I mean.

Houdini
03-24-2006, 05:35 PM
I did just that and I thought that I gave what I thought was happening, this really is not PHP but more to do with meta tags in the header of the page, it would do the same thing whether it were php html asp or whatever.

When the refresh is pressed by a user and not the script it will continue to bounce back and forth, why would you refresh something that is bouncing from one page to another all the time anyway, just wait 3 seconds and it will refresh itself?

Davidc316
03-24-2006, 05:48 PM
In answer.... because on the live website the page refresh is set to happen every five minutes, not every three seconds.

Davidc316
03-24-2006, 06:00 PM
.. (oops: if anyone knows how to delete accidental posts, please let me know)

Davidc316
03-24-2006, 06:01 PM
When the refresh is pressed by a user and not the script it will continue to bounce back and forth

Actually, I just realised... it's the other way round. When the user presses refresh the bouncing sequence stops.

gardnc
03-25-2006, 02:17 PM
Maybe if you did the refresh through a javascript. I don't think a refresh would do anything worse then possibly reset the timer.