Results 1 to 2 of 2
Thread: Automatically refresh page
2001-01-24, 23:03 #1
- Join Date
- May 2002
- Thanked 0 Times in 0 Posts
Automatically refresh page
Does anyone have HTML code to automatically refresh a web-page? I'm looking for code to updated a page that may be cached after I've made modifications to it. (In particular, a page containing price information).
I need something that will work on all browsers, preferably. I've looked at the Refresh metatag, but that seems only to redirect you from one page to another, and I want to refresh the current page.
Thanks for help
2001-01-26, 13:23 #2navirGuest
Re: Automatically refresh page
You already know the answer: Use the http-equiv attribute of the meta element to redirect to the SAME page. For example, if your page is filename.htm, then
<meta http-equiv="refresh" content="60; url='filename.htm'">
will reload the page filename.htm every 60 seconds.
Depending on how fast you can type, try this experiment:
Create a page (redirect_test.htm) with the following markup:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<meta http-equiv="refresh" content="60; url='redirect_test.htm'">
Open the page in Notepad, and in your browser. Quickly (within 60 seconds) change the markup in the file displayed in Notepad from <body bgcolor="yellow"> to <body bgcolor="red">. Then save the modified file (before the 60 seconds expire).
When 60 seconds expire, the page background will change from yellow to red. You can try this as many times as you want using values such as blue, aqua, black, and so on.