473,698 Members | 2,261 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PHP Header Refresh Issue

I am doing a simple php header refresh --
header('refresh : 10; url=msgs.php');
that just does a call back to my script every 10 seconds. Things work
great when the page is first loaded up, but if the end user hits F5 or
the refresh button, then the page stops refreshing indefinately. Any
ideas how to make it so that the page perpetually refreshes regardless
of what the end user presses?
Jul 17 '05
11 29566
In article <92************ *************@p osting.google.c om>,
tr****@gtsquare d.com (Tom Post) wrote:
tr****@gtsquare d.com (Tom Post) wrote in message
news:<92******* *************** ****@posting.go ogle.com>...
I am doing a simple php header refresh --
header('refresh : 10; url=msgs.php');
that just does a call back to my script every 10 seconds. Things work
great when the page is first loaded up, but if the end user hits F5 or
the refresh button, then the page stops refreshing indefinately. Any
ideas how to make it so that the page perpetually refreshes regardless
of what the end user presses?


I tried using:
<meta http-equiv="refresh" content="10; url=msgs.php" />

But it behaves exactly the same as using the php header fxn. If I hit
the IE refresh button, the refreshing no longer continues.


I said in my post that IE doesn't support the Refresh header. Try using
a different browser. Refresh is a Netscape-specific part of HTTP/1.0
and was removed from HTTP/1.1.

Rethink your use of this 'feature'. It won't work on every browser and
especially on IE.

--
DeeDee, don't press that button! DeeDee! NO! Dee...

Jul 17 '05 #11
Michael Vilain wrote:
I said in my post that IE doesn't support the Refresh header.
Mine does, but it's not on a Mac.

http://www.hixie.ch/tests/evil/mixed/refresh1.http.html
Try using a different browser.
Sound advice.
Refresh is a Netscape-specific part of HTTP/1.0 and was removed
from HTTP/1.1.
Neither HTTP/1.0 nor 1.1 define a Refresh header. Although
it's not a violation of either to respond with a Refresh.
Rethink your use of this 'feature'.
Sound advice again.
It won't work on every browser and especially on IE.


HTTP/1.1 compliant implementations aren't required to treat
Refresh in any particular way. Decent browsers offer the
option of ignoring both Refresh headers and META refreshes.

--
Jock
Jul 17 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3014
by: abdul bari | last post by:
Hi I was wondering how you apply header referesh to an XSl sheet. I want the generated html page to refresh. The following code doesnt work. <head> <title>sample</title> <xsl:attribute name ="http-equiv">Refresh</xsl:attribute> <xsl:attribute name ="content">5</xsl:attribute> </head>
1
4552
by: John Baker | last post by:
HI again: I have made 2 posts on this issue, and for some reason still haven't got the right result. I have a form which contains a number of totals. These totals use unbound control boxes and are of the form: =Dcount("field","table"). The form contains a number of buttons which trigger queries (using a macro) that update some tables and delete records from others. The effect of these macros is to change the counts that should register...
5
2492
by: Andrew Chanter | last post by:
I have a situation where I am using an unbound dialog form to update data in an Access 2002 split back end / front end scenario. The data update is done via an ADO call (direct to the back end db) when the user clicks the save button. The dialog then closes and the user should be able to see the result of their edit in a list view that now has focus. This is where I run into a problem. The list view wont refresh to pick up the data...
1
2899
by: Alfons Puig | last post by:
Hi, MSDN documentation about HTTP Response Headers say Refresh is obsolete and maintained for legacy application compatibility only. How can I achieve the same functionality to releoad the new contents of a page? I can use the timer component but, is there a http-like solution?
4
2031
by: John | last post by:
I get the feeling this is a pretty classic problem, but I'm a bit of an uber newber. Apologies! Products page, user enters a quantity and clicks one of my "Add to Cart" buttons, which bubbles up through the datalist and calls a method to AddToCart(cartID,prodID,prodQty). Now, if the user clicks 'refresh', that method is executed again without clicking the button. So if they add 2 apples, refresh, they have 4 apples, refresh, 6 apples,...
9
7763
by: PK9 | last post by:
I'm having an issue with the "Refresh" of an asp.net page. The refresh is actually calling my last onClick event. I thought that asp.net was supposed to be stateless in that it shouldn't remember that I clicked a button before the refresh. Here is what is going on: 1) Page Loads 2) User enters some values, clicks the "Save" button 3) The onClick event handler for the save button saves the data to the database and the page is...
19
2212
by: Justin | last post by:
Harlow... i need some help on these... im actually trying to do a page using php... the function is to receive certain parameters from a 3rd party provider... and i need to redirect my page to another page after certain validation. it's ok when i use the url to do the testing... the validation part works fine... scenario as below: if situation a, echo abc if situation b, echo abc then refresh to another page.
0
8680
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8609
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9169
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8899
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8871
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7738
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5861
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4371
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.