By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,396 Members | 1,869 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,396 IT Pros & Developers. It's quick & easy.

How to make a web page getting refreshed automatically

P: n/a
How to make a web page getting refreshed after a given time interval automatically.
HTML Code plz.

Tx
Ajay
Jul 20 '05 #1
Share this Question
Share on Google+
37 Replies


P: n/a
aj*************@yahoo.com (ajay) wrote in
news:2a**************************@posting.google.c om:
How to make a web page getting refreshed after a given time interval
automatically. HTML Code plz.

Tx
Ajay


You have one of two ways....

You can either use javascript to set a timeout such as:-
Refresh = window.setTimeOut
("window.location.href='http://www.webforumz.com'",3000)
would give a 3 second delay

or the prefered method would be to use a meta refresh such as:-
<meta http-equiv="refresh" content="3;url=http://www.webforumz.com">
to achieve the same effect.

Hope this helps

--
Robert Collyer
www.webforumz.com
Free Web Design and Development Help, Discussions, tips and Critique!
ASP, VB, .NET, SQL, CSS, HTML, Javascript, Flash, XML, SEO !
Jul 20 '05 #2

P: n/a
ajay wrote:
How to make a web page getting refreshed after a given time interval automatically.
HTML Code plz.


You'd better have an exceptionally good reason to want to do this, it
can be quite annoying for the user to have a page continually refresh
while they're trying to read it. It's better to let the user refresh it
when they're ready.

--
Lachlan Hunt
http://www.lachy.id.au/

Please direct all spam to abuse@localhost
Thank you.
Jul 20 '05 #3

P: n/a
Lachlan Hunt <la**********@lachy.id.au.invalid> wrote in
news:Kj****************@news-server.bigpond.net.au:
ajay wrote:
How to make a web page getting refreshed after a given time interval
automatically. HTML Code plz.


You'd better have an exceptionally good reason to want to do this,
it
can be quite annoying for the user to have a page continually refresh
while they're trying to read it. It's better to let the user refresh
it when they're ready.


It realy depends on the need?

Surely a forum's 'active topics' page has a very legitimate reason to
refresh every x seconds (or minutes)

There are good and bad applications for auto refreshing.

--
Robert Collyer
www.webforumz.com
Free Web Design and Development Help, Discussions, tips and Critique!
ASP, VB, .NET, SQL, CSS, HTML, Javascript, Flash, XML, SEO !
Jul 20 '05 #4

P: n/a
Rob Collyer <we*******@webforumz.com> writes:
Lachlan Hunt <la**********@lachy.id.au.invalid> wrote in
You'd better have an exceptionally good reason to want to do this,
it can be quite annoying for the user to have a page continually
refresh while they're trying to read it. It's better to let the
user refresh it when they're ready.
It realy depends on the need?

Surely a forum's 'active topics' page has a very legitimate reason to
refresh every x seconds (or minutes)


Seconds! No. Minutes, possibly, but even then probably not. At least
not by default (a web application I use has an option to refresh the
summary page at various time intervals, but it defaults to _not_)

If I want to know what the active topics are now, as opposed to last
minute (and it'd have to be a fairly high traffic forum for even that
to make a difference) then I'll refresh the page myself.
There are good and bad applications for auto refreshing.


True. If the user specifically asks for it, fine. If it happens
without their consent, not so good, especially since most browsers (IE
does, but it's in an obscure part of the settings) don't offer a way
to disable it.

--
Chris
Jul 20 '05 #5

P: n/a
Chris Morris <c.********@durham.ac.uk> wrote in
news:87************@dinopsis.dur.ac.uk:
Rob Collyer <we*******@webforumz.com> writes:
Lachlan Hunt <la**********@lachy.id.au.invalid> wrote in
> You'd better have an exceptionally good reason to want to do this,
> it can be quite annoying for the user to have a page continually
> refresh while they're trying to read it. It's better to let the
> user refresh it when they're ready.


It realy depends on the need?

Surely a forum's 'active topics' page has a very legitimate reason to
refresh every x seconds (or minutes)


Seconds! No. Minutes, possibly, but even then probably not. At least
not by default (a web application I use has an option to refresh the
summary page at various time intervals, but it defaults to _not_)

If I want to know what the active topics are now, as opposed to last
minute (and it'd have to be a fairly high traffic forum for even that
to make a difference) then I'll refresh the page myself.
There are good and bad applications for auto refreshing.


True. If the user specifically asks for it, fine. If it happens
without their consent, not so good, especially since most browsers (IE
does, but it's in an obscure part of the settings) don't offer a way
to disable it.


I totally agree..... our forums also default to not, but it's a tool the
forums provide shoulkd the user need it!!

I dont think a site should ever force a refresh upon the user unless the
application requires it... such asa server side scripting based chat,
that refreshes every few secs (and boy... everyone hates those, right?)

--
Robert Collyer
www.webforumz.com
Free Web Design and Development Help, Discussions, tips and Critique!
ASP, VB, .NET, SQL, CSS, HTML, Javascript, Flash, XML, SEO !
Jul 20 '05 #6

P: n/a
On Tue, 20 Jul 2004 10:50:09 +0000 (UTC), Rob Collyer
<we*******@webforumz.com> wrote:

I totally agree..... our forums also default to not, but it's a tool the
forums provide shoulkd the user need it!!


Opera has an option to set automatic reload. I don't recall Mozilla,
perhaps it as well. I'd prefer to set it in the browser than through the
page.
Jul 20 '05 #7

P: n/a
DC
Neal wrote:
On Tue, 20 Jul 2004 10:50:09 +0000 (UTC), Rob Collyer
<we*******@webforumz.com> wrote:
I totally agree..... our forums also default to not, but it's a tool the
forums provide shoulkd the user need it!!

Opera has an option to set automatic reload. I don't recall Mozilla,
perhaps it as well. I'd prefer to set it in the browser than through the
page.

Mozilla's Tab Extensions add this functionality. It is also available
for Firefox.

--
DC Linux RU #1000111011000111001

Why I love Open Source: http://support.microsoft.com/?kbid=111601
Jul 20 '05 #8

P: n/a
Rob Collyer wrote:
aj*************@yahoo.com (ajay) wrote:
How to make a web page getting refreshed after a given time
interval automatically.
You can either use javascript

[snip] or the prefered method would be to use a meta refresh such as:-
<meta http-equiv="refresh"
content="3;url=http://www.webforumz.com">


Please stop giving such bad advice. Hardly the "preferred method", the
meta http-equiv is particularly hackish, since it is not an "equiv" to
anything. There is no "refresh" header in HTTP, which is a stateless
protocol. A client requests a resource from a server, the server
responds, the communication is then terminated. Period. There is no
way to achieve what the op wants on the server end. That's the only
correct answer.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #9

P: n/a
ajay wrote:
How to make a web page getting refreshed after a given time
interval automatically. HTML Code plz.


There is no (standard) HTML code to do this. HTML is a markup
language, not a programming language. You can, however, configure
certain browsers to automatically reload a page. Opera can do this; I
think Mozilla can as well, but I'm not sure.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #10

P: n/a
Rob Collyer wrote:
Chris Morris wrote:

Rob Collyer <we*******@webforumz.com> writes:
Surely a forum's 'active topics' page has a very legitimate
reason to refresh every x seconds (or minutes)

Surely not. How do you know when the visitor has finished reading a
comment and is ready to reload the page? How do you know that they
want to reload it?
If I want to know what the active topics are now, as opposed to
last minute (and it'd have to be a fairly high traffic forum for
even that to make a difference) then I'll refresh the page
myself.


I totally agree..... our forums also default to not, but it's a
tool the forums provide shoulkd the user need it!!


There is no way to reliably provide this tool on the server end, and
it's quite pointless to create some half-broke, half-baked replication
of this feature that will only work on your site. Much like javascript
"back" functions, it is more harmful to the reader.

Your visitors are not as dumb as you think. They are quite capable of
pressing ctrl-R or clicking a "reload" button. And if you're convinced
they are that stupid, you'd be better off teaching the user how to use
their browser than creating a replication.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #11

P: n/a
On Tue, 20 Jul 2004 14:39:15 -0400, Brian
<us*****@julietremblay.com.invalid> wrote:
Rob Collyer wrote:
Chris Morris wrote:
If I want to know what the active topics are now, as opposed to
last minute (and it'd have to be a fairly high traffic forum for
even that to make a difference) then I'll refresh the page
myself.
I totally agree..... our forums also default to not, but it's a
tool the forums provide shoulkd the user need it!!

Your visitors are not as dumb as you think. They are quite capable of
pressing ctrl-R or clicking a "reload" button. And if you're convinced
they are that stupid, you'd be better off teaching the user how to use
their browser than creating a replication.


I think you're overreacting just a little, Brian. While auto-refresh is
certainly overused on the Web, there are situations where it is
perfectly reasonable, such as showing a cricket or tennis score for
example. And as long as the reader has the option to choose the
auto-refreshing version or not, I don't see any objection to it.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #12

P: n/a
Stephen Poley wrote:
Brian wrote:
Your visitors are not as dumb as you think. They are quite
capable of pressing ctrl-R or clicking a "reload" button. And if
you're convinced they are that stupid, you'd be better off
teaching the user how to use their browser
I think you're overreacting just a little, Brian. While
auto-refresh is certainly overused on the Web, there are situations
where it is perfectly reasonable, such as showing a cricket or
tennis score for example.


I cannot agree. If I were reading cricket scores, and searching for
the Jamaica v. India match, I'd be rather sore to find the page reload
just when I caught sight of an image of Jamaica's flag. "There it is!
Wait, what just happened?" And after the page reloads, I'd have to
begin my search anew.
And as long as the reader has the option to choose the
auto-refreshing version or not, I don't see any objection to it.


I think that's a stretch. It should be opt-in, not opt-out. So the
main page should be a normal page, with a link to the auto refresh
page. That just raises the question: if the visitor might want to
refresh the results, wouldn't it be easier to press ctrl-R then go to
a new page?

Aside: this would require that the author maintain two pages with
essentially the same information, which is never a wise plan.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #13

P: n/a
Brian <us*****@julietremblay.com.invalid> wrote in news:10fqp1rjf72ds31
@corp.supernews.com:
Rob Collyer wrote:
aj*************@yahoo.com (ajay) wrote:
How to make a web page getting refreshed after a given time
interval automatically.


You can either use javascript

[snip]
or the prefered method would be to use a meta refresh such as:-
<meta http-equiv="refresh"
content="3;url=http://www.webforumz.com">


Please stop giving such bad advice. Hardly the "preferred method", the
meta http-equiv is particularly hackish, since it is not an "equiv" to
anything. There is no "refresh" header in HTTP, which is a stateless
protocol. A client requests a resource from a server, the server
responds, the communication is then terminated. Period. There is no
way to achieve what the op wants on the server end. That's the only
correct answer.


Actually I disagree....

Just because the w3c standards may or may not have Meta Refresh in their
specs doesnt mean people dont use it.... why do they use it then... coz I
tell ya something, I much prefer that method (as others do) than
JavaScript.

For those that have swallowed the w3c handbook, then I apologise for the
use of the swear phrase 'Meta Refresh' ;)

--
Robert Collyer
www.webforumz.com
Free Web Design and Development Help, Discussions, tips and Critique!
ASP, VB, .NET, SQL, CSS, HTML, Javascript, Flash, XML, SEO !
Jul 20 '05 #14

P: n/a
Stephen Poley <sb******************@xs4all.nl> wrote in
news:kc********************************@4ax.com:
On Tue, 20 Jul 2004 14:39:15 -0400, Brian
<us*****@julietremblay.com.invalid> wrote:
Rob Collyer wrote:
> Chris Morris wrote: If I want to know what the active topics are now, as opposed to
last minute (and it'd have to be a fairly high traffic forum for
even that to make a difference) then I'll refresh the page
myself.

I totally agree..... our forums also default to not, but it's a
tool the forums provide shoulkd the user need it!!

Your visitors are not as dumb as you think. They are quite capable of
pressing ctrl-R or clicking a "reload" button. And if you're convinced
they are that stupid, you'd be better off teaching the user how to use
their browser than creating a replication.


I think you're overreacting just a little, Brian. While auto-refresh is
certainly overused on the Web, there are situations where it is
perfectly reasonable, such as showing a cricket or tennis score for
example. And as long as the reader has the option to choose the
auto-refreshing version or not, I don't see any objection to it.


I second that! It should be down to the user to choose as I already
mentioned.

--
Robert Collyer
www.webforumz.com
Free Web Design and Development Help, Discussions, tips and Critique!
ASP, VB, .NET, SQL, CSS, HTML, Javascript, Flash, XML, SEO !
Jul 20 '05 #15

P: n/a
Brian <us*****@julietremblay.com.invalid> wrote in news:10fr22m3aibg110
@corp.supernews.com:
Stephen Poley wrote:
Brian wrote:
Your visitors are not as dumb as you think. They are quite
capable of pressing ctrl-R or clicking a "reload" button. And if
you're convinced they are that stupid, you'd be better off
teaching the user how to use their browser


I think you're overreacting just a little, Brian. While
auto-refresh is certainly overused on the Web, there are situations
where it is perfectly reasonable, such as showing a cricket or
tennis score for example.


I cannot agree. If I were reading cricket scores, and searching for
the Jamaica v. India match, I'd be rather sore to find the page reload
just when I caught sight of an image of Jamaica's flag. "There it is!
Wait, what just happened?" And after the page reloads, I'd have to
begin my search anew.
And as long as the reader has the option to choose the
auto-refreshing version or not, I don't see any objection to it.


I think that's a stretch. It should be opt-in, not opt-out. So the
main page should be a normal page, with a link to the auto refresh
page. That just raises the question: if the visitor might want to
refresh the results, wouldn't it be easier to press ctrl-R then go to
a new page?

Aside: this would require that the author maintain two pages with
essentially the same information, which is never a wise plan.


Brian... you just have to agree that half the planet is just 'lazy' by
nature... there is nothing wrong with making it a little easier for
people.

Web developers are constantly using methods to COMPLIMENT browser
behavior and there is nothing wrong with that.

I do however frown on tactics used to break browser behaviour, such as
using a redirect on the homepage which makes the back button useless coz
you just get back to the same place.

One other nag on the same issue are sites that break themselves out of
frames... forcing the browser to work the way the 'site' wants it to, and
not the way it would normally behave.

Do you know any sites that do that Brian?

--
Robert Collyer
www.webforumz.com
Free Web Design and Development Help, Discussions, tips and Critique!
ASP, VB, .NET, SQL, CSS, HTML, Javascript, Flash, XML, SEO !
Jul 20 '05 #16

P: n/a
Rob Collyer wrote:
Just because the w3c standards may or may not have Meta Refresh in
their specs doesnt mean people dont use it....
Just because the w3c standards may not have bordercolor attribute
doesn't mean people don't use it.

Just because the w3c standards may not have marginheight attribute
doesn't mean people don't use it.

I could go on.
why do they use it then...
Why do they use <blockquote> for indent? Why do they fail to specify a
charset in the http headers? Why do they leave out a dtd?

If you base your authoring principles on what most people do on the
www, you'll have some sorry pages.
For those that have swallowed the w3c handbook, then I apologise
for the use of the swear phrase 'Meta Refresh' ;)


The point is that meta refresh is a hack that will only work in
user-agents that have decided to add support for it. But some uas have
not. When you provide bad advice, it will only frustrate those coming
here for answers.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #17

P: n/a
Rob Collyer wrote:

[excessive quoting snipped; please trim your quotes]
Brian wrote:
If I were reading cricket scores, and searching for the Jamaica
v. India match, I'd be rather sore to find the page reload just
when I caught sight of an image of Jamaica's flag. "There it is!
Wait, what just happened?" And after the page reloads, I'd have
to begin my search anew.
Brian... you just have to agree that half the planet is just 'lazy'
by nature...


No, I don't have to agree to that. I don't disdain my readers that
much. I do assume that my visitors are more likely to know when they
want to obtain a fresh copy of a resource. So I let them request one,
rather than futilely trying to impose one on them.
there is nothing wrong with making it a little easier for people.
It doesn't make it easier. It makes it different. The meta-refresh
hack has one of two outcomes:

(1) in proper agents, or those that have been configured as such, it
ignores it, so adding the hack is pointless

(2) it imposes a reload of the resource on visitor whether that
visitor wanted it or not
Web developers are constantly using methods to COMPLIMENT browser
behavior and there is nothing wrong with that.
Of course there is. It is pointless to try to reinvent the wheel,
adding functionality to a browser in HTML. In case you missed the
memo, HTML is not a programming language, it is a markup language. It
can be used to mark up the structure of a document, and do a
reasonable job. If you try to make it into an application programming
language, you'll have poor results.
I do however frown on tactics used to break browser behaviour, such
as using a redirect on the homepage which makes the back button
useless coz you just get back to the same place.
i.e., using meta-refresh? Are you just trolling?
One other nag on the same issue are sites that break themselves out
of frames...
Not sure why you brought this up. I can only imagine that you mean
site authors whose pages are framed by other sites. That is generally
regarded as a copyright infringment, and thus illegal.
forcing the browser to work the way the 'site' wants it to
Which site? The site that created the illegal frameset? Or the site
trying to break them?
and not the way it would normally behave.
You're just flailing now. The way a site "would normally behave" is
certainly not with frames. A "normal" site, if you can call it as
such, assigns a unique url to each resource. Most framed sites do not
do that.
Do you know any sites that do that Brian?


I get the feeling I'm being baited.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #18

P: n/a

"Brian" <us*****@julietremblay.com.invalid> wrote in message
news:10*************@corp.supernews.com...
Rob Collyer wrote:
Just because the w3c standards may or may not have Meta Refresh in
their specs doesnt mean people dont use it....
Just because the w3c standards may not have bordercolor attribute
doesn't mean people don't use it.

Just because the w3c standards may not have marginheight attribute
doesn't mean people don't use it.


These are example of invalid HTML, while Meta Refresh isn't, so the reasons
for avoiding them aren't comparable.

W3C doesn't specify the use of Flash or Acrobat either, but that fact is
irrelevant to whether a given use of those products on a web page is
advisable. Their use should be judged based on other considerations (need,
nuisance level, graceful degradation if support is unavailable or turned
off, etc.), but whether W3C mentions them doesn't come into it. This is
generally true if a feature:

(a) is inherently reasonable and useful *before* considering the pros
and cons of the implementation,

(b) is a nice supplement to, but not necessary to the proper functioning
of, a web page,

(c) doesn't violate the standards,

(d) will work in UAs that recognize it, and

(e) will be ignored in UAs that don't, and any information conveyed by
the feature is instead presented seamlessly in another form.

[snip]
The point is that meta refresh is a hack that will only work in
user-agents that have decided to add support for it.


But no harm is done in UAs that don't support it. This is known as degrading
gracefully, which is generally considered a good thing. It isn't wrong to
provide a supplemental feature just because only *some* people will benefit
from it.

Jul 20 '05 #19

P: n/a
Harlan Messinger wrote:
Brian wrote...
Rob Collyer wrote:
Just because the w3c standards may or may not have Meta Refresh
in their specs doesnt mean people dont use it....
Just because the w3c standards may not have bordercolor attribute
doesn't mean people don't use it. Just because the w3c standards
may not have marginheight attribute doesn't mean people don't
use it.


These are example of invalid HTML, while Meta Refresh isn't,


That's a spurious argument. The meta refresh hack is not invalid HTML,
but then how could it be? Surely you know that "valid" in HTML refers
only to syntax.

http://www.julietremblay.com/test/valid

Take a look at the META element in the head, then validate the
document. I wish people would stop confusing "valid" with
"conforming". NB: The test/valid document violates at least one rfc,
and the markup is uncontesably illegal, yet it is a valid HTML 4.01
strict document because the syntax is correct.
so the reasons for avoiding them aren't comparable.
Marginheight is not in any HTML recommendation produced by the W3C.
Refresh header is not in any rfc produced by any standards body. There
is no such http header as "refresh". As such, there is no such
standard http-equiv called "refresh".
W3C doesn't specify the use of Flash or Acrobat either
More spurious arguments. These are proprietary content formats, and
are thus outside the scope of the W3C. The http protocol is not
outside of its scope.
The point is that meta refresh is a hack that will only work in
user-agents that have decided to add support for it.


But no harm is done in UAs that don't support it.


Correct. Harm is only done in UAs that *do* support it. That's
precisely what I stated earlier in this thread. It's sort of like
target="_new". Either it will have no effect, or worse, it will work
as the author wants and interfere with the visitor.

BTW, automatically refreshing a display is in violation of the WAI
guidelines.
It isn't wrong to provide a supplemental feature just because only
*some* people will benefit from it.


What's your definition of "benefit"?

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #20

P: n/a
On Wed, 21 Jul 2004 09:26:56 +0000 (UTC), Rob Collyer
<we*******@webforumz.com> wrote:

Brian... you just have to agree that half the planet is just 'lazy' by
nature... there is nothing wrong with making it a little easier for
people.


If you just make a page with no magical auto-refresh, I can (with a
keypress and a click) ask my browser to refresh it for me. If you
"make it easier for me", I have to go to a lot more effort to *avoid*
the page auto-refreshing.

My browser provides the option to disable such refreshing, but sadly
some idiot somewhere thought it was a great idea to link to HTML files
which "refresh" to downloadable files rather than just linking to the
damn files in the first place, so I can't make use of this otherwise
very-useful feature without having to go to the effort of disabling it
each time I want to download something from a site maintained by a
fool.

(sadly, this includes sourceforge, through which I must frequently
download stuff. Fortunately, their URL paths are predictable so a bit
of filtering proxy magic can fix that specific case.)

Sorry for the soaking of bitterness evident in this entry. As you can
see, pages which reload without my knowledge or intention are one of
my least favourite things.

Best regards,
-Claire
Jul 20 '05 #21

P: n/a

"Brian" <us*****@julietremblay.com.invalid> wrote in message
news:10*************@corp.supernews.com...
Harlan Messinger wrote:
Brian wrote...
Rob Collyer wrote:

Just because the w3c standards may or may not have Meta Refresh
in their specs doesnt mean people dont use it....

Just because the w3c standards may not have bordercolor attribute
doesn't mean people don't use it. Just because the w3c standards
may not have marginheight attribute doesn't mean people don't
use it.
These are example of invalid HTML, while Meta Refresh isn't,


That's a spurious argument. The meta refresh hack is not invalid HTML,
but then how could it be? Surely you know that "valid" in HTML refers
only to syntax.


I know perfectly well what it means. You seem to have misunderstood what I
said. Marginheight and bordercolor shouldn't be used because they're
*invalid*. Meta Refresh *isn't* invalid. Therefore, the reason marginheight
and bordercolor should be avoided is completely inapplicable to Meta
Refresh. It's your attempt to draw an analogy between marginheight and
bordercolor on one hand and Meta Refresh on the other that's spurious.

http://www.julietremblay.com/test/valid

Take a look at the META element in the head, then validate the
document. I wish people would stop confusing "valid" with
"conforming".
<blockquote>
The http-equiv attribute can be used in place of the name attribute and has
a special significance when documents are retrieved via the Hypertext
Transfer Protocol (HTTP). HTTP servers may[1] use the property name
specified by the http-equiv attribute to create an [RFC822]-style header in
the HTTP response. Please see the HTTP specification ([RFC2616]) for details
on valid HTTP headers.

The following sample META declaration:

<META http-equiv="Expires" content="Tue, 20 Aug 1996 14:25:27 GMT">

will result in the HTTP header:

Expires: Tue, 20 Aug 1996 14:25:27 GMT

This can be used by caches to determine when to fetch a fresh copy of the
associated document.

Note. Some user agents support the use of META to refresh the current page
after a specified number of seconds, with the option of replacing it by a
different URI. Authors should not use this technique to forward users to
different pages, as this makes the page inaccessible to some users. Instead,
automatic page forwarding should be done using server-side redirects.[2]
</blockquote>

[1] *May*.

[2] When a specification explicitly forbids or recommends against a *subset*
of a practice, without saying anything about the practice as a whole, it is
usual to conclude *by implication* that there is no prohibition on the
practice as a whole. It happens that, AIUI, this is a standard US principle
for interpreting laws and contracts, and it makes sense because, clearly, if
the committee had intended to prohibit the practice as a whole, they would
have done so explicitly instead of bothering to prohibit only a subset of
it.
NB: The test/valid document violates at least one rfc,
and the markup is uncontesably illegal, yet it is a valid HTML 4.01
strict document because the syntax is correct.
so the reasons for avoiding them aren't comparable.
Marginheight is not in any HTML recommendation produced by the W3C.
Refresh header is not in any rfc produced by any standards body. There
is no such http header as "refresh". As such, there is no such
standard http-equiv called "refresh".
W3C doesn't specify the use of Flash or Acrobat either


More spurious arguments. These are proprietary content formats, and
are thus outside the scope of the W3C. The http protocol is not
outside of its scope.


So you shouldn't use http-equiv="Refresh" because it isn't specified by W3C
AND because it's within the scope of the W3C.
The point is that meta refresh is a hack that will only work in
user-agents that have decided to add support for it.


But no harm is done in UAs that don't support it.


Correct. Harm is only done in UAs that *do* support it. That's
precisely what I stated earlier in this thread.


I said that I wasn't dealing with that part of your discussion, just the
part involving your bad analogy and that which followed. What do you expect
to accomplish by bringing up the part of your argument that I said I wasn't
dealing with, that I deliberately set aside--with which I *may even agree
wholeheartedly*--to counter an argument I made against the *other* things
that you said? Aren't you able to separate the parts of an argument from
each other?

Jul 20 '05 #22

P: n/a
On Wed, 21 Jul 2004, Harlan Messinger wrote:
These are example of invalid HTML, while Meta Refresh isn't, so the reasons
for avoiding them aren't comparable.
Quite right. Invalid HTML violates W3C technical recommendations,
whereas misuse of HTTP gives you problems with not only the WAI
recommendations but also the IETF standards-track RFC, which is a more
serious matter, since these RFCs are the backbone of the Internet
itself.
W3C doesn't specify the use of Flash or Acrobat either,
<a href="..."> can link to any media. <object...> can contain any
appropriate media. It's nicer if they're not proprietary formats, for
sure, but that isn't mandatory.
(d) will work in UAs that recognize it, and
Those are often the worst!
But no harm is done in UAs that don't support it.
Not in the way that's being discussed here, right: in this case, the
harm is done in those which -do- support it.

Thought there are some other nasty ways of "using" meta..refresh which
-do- make the function dependent on support being implemented. So
that's even worse.
It isn't wrong to provide a supplemental feature just because only
*some* people will benefit from it.


As a general principle, I don't disagree with you. But there are
other implications to be taken into account before making the final
choice.

I won't pretend that I haven't occasionally found uses for
meta...refresh, despite my normal tendency to deprecate it. But only
offered as a user choice.
Jul 20 '05 #23

P: n/a
Claire Tucker <fa**@invalid.invalid> wrote in
news:1q********************************@4ax.com:
On Wed, 21 Jul 2004 09:26:56 +0000 (UTC), Rob Collyer
<we*******@webforumz.com> wrote:

Brian... you just have to agree that half the planet is just 'lazy' by
nature... there is nothing wrong with making it a little easier for
people.


If you just make a page with no magical auto-refresh, I can (with a
keypress and a click) ask my browser to refresh it for me. If you
"make it easier for me", I have to go to a lot more effort to *avoid*
the page auto-refreshing.

My browser provides the option to disable such refreshing, but sadly
some idiot somewhere thought it was a great idea to link to HTML files
which "refresh" to downloadable files rather than just linking to the
damn files in the first place, so I can't make use of this otherwise
very-useful feature without having to go to the effort of disabling it
each time I want to download something from a site maintained by a
fool.

(sadly, this includes sourceforge, through which I must frequently
download stuff. Fortunately, their URL paths are predictable so a bit
of filtering proxy magic can fix that specific case.)

Sorry for the soaking of bitterness evident in this entry. As you can
see, pages which reload without my knowledge or intention are one of
my least favourite things.

Best regards,
-Claire


Look everyone....

Here's my stand-point...

Site's giving a user an auto-refresh 'option' and I STRESS option, are
not breaking any kind of usability laws in my book...

An auto refreshing server side scripted chat application for instance
relies on this to function (I know those types suck, but hey!)

If the OPTION lies with the user, then where is the harm?

--
Robert Collyer
www.webforumz.com
Free Web Design and Development Help, Discussions, tips and Critique!
ASP, VB, .NET, SQL, CSS, HTML, Javascript, Flash, XML, SEO !
Jul 20 '05 #24

P: n/a
On Wed, 21 Jul 2004 20:48:39 +0000 (UTC), Rob Collyer
<we*******@webforumz.com> wrote:

Site's giving a user an auto-refresh 'option' and I STRESS option, are
not breaking any kind of usability laws in my book...

An auto refreshing server side scripted chat application for instance
relies on this to function (I know those types suck, but hey!)

If the OPTION lies with the user, then where is the harm?


If it's off by default, or *at worst* it gives a very clear warning
that it's going to happen, then I won't be so annoyed. However, it
annoys me when I leave a browser window open and come back to it a
while later only to find that it's been wasting my bandwidth pulling
down the same images and text over and over when I wasn't even there.
If they'd warned me, then I would have closed the browser window as a
matter of urgency, or taken steps to ensure that it wouldn't refresh
if I *really* needed the content on the page.

Take care,
-Claire
Jul 20 '05 #25

P: n/a
Harlan Messinger wrote:
Brian wrote...

You seem to have misunderstood what I said. Marginheight and
bordercolor shouldn't be used because they're *invalid*. Meta
Refresh *isn't* invalid.
You still don't get it. It's **impossible** for meta refresh to be
"invalid", as my test case makes clear. So arguing that meta refresh
is valid is besides the point. Validity is not the issue. Proprietary
hacks are.
Therefore, the reason marginheight and bordercolor should be
avoided is completely inapplicable to Meta Refresh.
In both cases, these are proprietary "extensions". Marginheight is
non-standard html; meta-refresh is non-standard http. My problem is
not with the markup, it's with the http hack.
http://www.julietremblay.com/test/valid


There's the test case for latecomers. Several examples of incorrect
code, but the document will validate because the sytax matches that of
HTML 4.01 strict.
<blockquote> The http-equiv attribute can be used in place of the
name attribute and has a special significance when documents are
retrieved via the Hypertext Transfer Protocol (HTTP). HTTP servers
may[1] use the property name specified by the http-equiv attribute
to create an [RFC822]-style header in the HTTP response. Please see
the HTTP specification ([RFC2616]) for details on valid HTTP
headers.
Great. So did you take their advice and look at the HTTP
specification? Did you see anything about a "refresh" header?

[blockquote continued] Note. Some user agents support the use of META to refresh the
current page after a specified number of seconds
Some user agents may support the completely non-standard marginheight,
too. Some user agents may support css files even when the mime type
declares the content to be text/css. None of these conform to the
relevant specs. Since when does ua support define the standard?
[2] When a specification explicitly forbids or recommends against a
*subset* of a practice, without saying anything about the practice
as a whole, it is usual to conclude *by implication* that there is
no prohibition on the practice as a whole.


That's a nice opinion. The HTTP protocol is definitive, though.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #26

P: n/a
On Wed, 21 Jul 2004, Claire Tucker wrote:
annoys me when I leave a browser window open and come back to it a
while later only to find that it's been wasting my bandwidth pulling
down the same images and text over and over when I wasn't even there.


Even worse when you find dozens of copies of the refreshed URL on the
history list, and the URLs that you *wanted* to revisit have been
pushed right off the end. (OK, that may be partially a browser
infelicity - but it's still been provoked by the wretched document
author).

Jul 20 '05 #27

P: n/a
ajay wrote:
HTML Code plz.

Tx


If you're too lazy to spell out "please" and "thanks", why should we be any
less lazy when it comes to helping you?

--
Shawn K. Quinn
Jul 20 '05 #28

P: n/a
On Tue, 20 Jul 2004 17:02:09 -0400, Brian
<us*****@julietremblay.com.invalid> wrote:
Stephen Poley wrote:
I think you're overreacting just a little, Brian. While
auto-refresh is certainly overused on the Web, there are situations
where it is perfectly reasonable, such as showing a cricket or
tennis score for example.


I cannot agree. If I were reading cricket scores, and searching for
the Jamaica v. India match, I'd be rather sore to find the page reload
just when I caught sight of an image of Jamaica's flag. "There it is!
Wait, what just happened?" And after the page reloads, I'd have to
begin my search anew.


I really get the impression you're trying to make difficulties. Go to
http://news.bbc.co.uk/sport2/hi/cric...nd/3913447.stm
select "ball-by-ball updates" (assuming you get there before end of play
today - otherwise try tomorrow) and explain to me what exactly the
problem is with it.
And as long as the reader has the option to choose the
auto-refreshing version or not, I don't see any objection to it.


I think that's a stretch. It should be opt-in, not opt-out. So the
main page should be a normal page, with a link to the auto refresh
page. That just raises the question: if the visitor might want to
refresh the results, wouldn't it be easier to press ctrl-R then go to
a new page?


Not if they want to have the window permanently on view for a long
period (e.g. an hour or two) refreshing regularly.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #29

P: n/a

"Brian" <us*****@julietremblay.com.invalid> wrote in message
news:10*************@corp.supernews.com...
Harlan Messinger wrote:
Brian wrote...

You seem to have misunderstood what I said. Marginheight and
bordercolor shouldn't be used because they're *invalid*. Meta
Refresh *isn't* invalid.
You still don't get it. It's **impossible** for meta refresh to be
"invalid",


I keep affirming that it's not invalid, and you keep replying that I don't
get it, because it's *impossible* for it to be invalid. So when you say
something *can't* be true, it's wrong for me to say that it *isn't* true?
as my test case makes clear. So arguing that meta refresh
is valid is besides the point.


1. It *is* valid.

2. It is not beside the point, it's precisely the reason why your analogy
with two constructs that *are* invalid is bogus.

Do you think the bogosity of your analogy between

a. two construct that are bad because they are invalid and

b. a valid construct that may be bad but for a completely different reason

disappears because not only is the latter construct valid but it is
impossible for it to be invalid? If so, then this point is remarkably
subtle--and also absurd.

Jul 20 '05 #30

P: n/a
Stephen Poley wrote:
Brian wrote:
If I were reading cricket scores, and searching for the Jamaica
v. India match, I'd be rather sore to find the page reload just
when I caught sight of an image of Jamaica's flag.
I really get the impression you're trying to make difficulties.


No, I'm trying to explain why I hate when page authors try to make my
browser into their application. If I want to update the page, I'll
reload it myself, or set to reload automatically. I consider this much
like I see authors trying to force other things on the www such as
fixed font size or new browser windows.
http://news.bbc.co.uk/sport2/hi/cric...nd/3913447.stm select
"ball-by-ball updates"
I'm afraid I must have missed it. It says, "updates will appear when
play begins."
explain to me what exactly the problem is with it.


Sure.

Problem 1: Is there some reason why the page has to waste my bandwidth
-- I'm on dialup, and my connection speed is never above 20Kbps -- to
reload the page that says, "updates will appear when play begins."
Note that they made sure I must download that page anew each time by
including "no-cache" headers.

Problem 2: I tried to go back to the BBC sports page, but the meta
refresh inserted copies of the "ball by ball update" page, interfering
with my browser's back functionality.
And as long as the reader has the option to choose the
auto-refreshing version or not,

I don't see any option to choose on that page. If you want to get the
latest score, you get an auto-reloading page.
if the visitor might want to refresh the results, wouldn't it be
easier to press ctrl-R then go to a new page?


Not if they want to have the window permanently on view for a long
period (e.g. an hour or two) refreshing regularly.


For the page above, it is not opt-in. If I don't want the page to
reload on its own, I must configure my browser to ignore the
non-standard pseudo-header. If they want to provide this as a service
to users whose browser does not provide that functionality (Opera
does; Mozilla does with an add-in; IE does not AFAIK), they should
provide a link to both pages.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/

Jul 20 '05 #31

P: n/a
Harlan Messinger wrote:
Brian wrote...
Harlan Messinger wrote:
Marginheight and bordercolor shouldn't be used because they're
*invalid*.
I must interject something here. Why is that such a big deal?
Sure, using them means you can't put the nifty "Valid HTML!" badge on
your site, but how much of a problem will it cause users?

Don't get me wrong: If someone asked me, I'd tell them to use standard
CSS, since they are more likely to get the rendering they'd like. But
if page margins are off because of non-standard body attributes, it
wouldn't likely be a major problem.
Meta Refresh *isn't* invalid.
I keep affirming that it's not invalid,
So I've noticed. But is *is* non-standard. You keep dodging that part.
And it is more likely to cause usability problems besides.
<META HTTP-EQUIV="Expires" content="Fri, 23 July 2004 12:00:00 GMT">

This is valid HTML. In theory, it is equivalent to this HTTP header:

Expires: Fri, 23 July 2004 12:00:00 GMT

This HTTP header gives the date and time when the resource should no
longer be considered fresh. (As an meta HTTP-equiv pseudo-header, it
has no effect on proxy caches, but might have some effect in browsers.)

<META HTTP-EQUIV="gobbleygook" CONTENT="this is illogical, but valid">

This is valid HTML. In theory, it is equivalent to this HTTP header:

gobbleygook: this is illogical, but valid

Since gobbleygook is not part of the HTTP protocol, it will have no
effect in any ua or proxy.

<META HTTP-EQUIV="refresh" content="2;URL=http://www.example.com/">

That is valid html. In theory, it is equivalent to this HTTP header:

refresh: 2;URL=http://www.example.com/

Since refresh is not part of the HTTP protocol, it should have no
effect in any ua or proxy. Unfortunately, a couple of browsers treat
this as a command to load the url http://www.example.com/ after 2
seconds, taking control away from the user.
Do you think the bogosity of your analogy between

a. two construct that are bad because they are invalid
You've given me the impression that you don't really understand what
valid means in HTML, aside from bragging rights ("my page uses only
valid html 4"). You have convinced me of one thing: those "valid"
icons are worse than useless, they are misleading. I find that even
ciwah regulars cannot make out what they mean, and what they *don't* mean.
b. a valid construct that may be bad but for a completely different
reason


Namely, that it is not in the http spec. It is a proprietary extension
to http, sort of like marginheight is a proprietary extension to the
html recommendation. But you're right, they are different. Using
marginheight is considerably less likely to cause usability problems
then meta refresh.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #32

P: n/a

"Brian" <us*****@julietremblay.com.invalid> wrote in message
news:10*************@corp.supernews.com...
Stephen Poley wrote:
Brian wrote:
If I were reading cricket scores, and searching for the Jamaica
v. India match, I'd be rather sore to find the page reload just
when I caught sight of an image of Jamaica's flag.


I really get the impression you're trying to make difficulties.


No, I'm trying to explain why I hate when page authors try to make my
browser into their application.


Now that's a load of garbage. If someone wants to offer an application for
which there's an audience, and it can be done in a web browser, who are you
or anybody else to say they shouldn't do it? It's like saying I shouldn't
offer Java-based applications to anybody because some people want to run
native-code-only apps on their computers and don't want to download the JRE.

If you don't want to benefit from an application, then don't. Stay away.
Stick to W3C web pages. I *agree* that the person offering the site should
make clear up front that the user is about to step *into* an application, so
that the user who doesn't want to can choose to avoid it. But carrying on as
though the person providing the application is committing a grievous
trespass is sheer belligerence.

Jul 20 '05 #33

P: n/a
Harlan Messinger wrote:
Brian wrote:

[re meta refresh pseudo header]
I'm trying to explain why I hate when page authors try to make my
browser into their application.
Now that's a load of garbage.


Rather belligerent tone you have there.
If someone wants to offer an application for which there's an
audience, and it can be done in a web browser, who are you or
anybody else to say they shouldn't do it? It's like saying I
shouldn't offer Java-based applications to anybody because some
people want to run native-code-only apps on their computers and
don't want to download the JRE.
Except that a Java application will advertise itself as such via http
headers, giving the user some idea of what to expect. They can decide
not to download it if they don't want to. Meta refresh does not
provide any such warning.
If you don't want to benefit from an application, then don't. Stay
away.
This isn't about my personal experience on the www. We discuss good
authoring practices in here. I'm pretty sure my comments have been
on-topic. If you disagree, feel free to call me out.
I *agree* that the person offering the site should make clear up
front that the user is about to step *into* an application, so that
the user who doesn't want to can choose to avoid it.
Then why are you yelling at me?
But carrying on as though the person providing the application is
committing a grievous trespass is sheer belligerence.


Belligerence? I'm sorry, are you the kettle or the pot?

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #34

P: n/a
Brian wrote:
[...]
We discuss good authoring practices in here.


I think that's the point. It seems like people have different opinions what
"good authoring practices" are.

Boris
Jul 20 '05 #35

P: n/a
aj*************@yahoo.com (ajay) wrote in message news:<2a**************************@posting.google. com>...
How to make a web page getting refreshed after a given time interval automatically.
HTML Code plz.

Tx
Ajay


example <HEAD>
.........
example <META HTTP-EQUIV=Refresh CONTENT=15; URL=/>
.........
example </HEAD>

code example to refresh default page of your site,
15 means time interval in seconds
(remove example words before HTML tags
Regards
http://www.smike.ru
Jul 20 '05 #36

P: n/a
On 23 Jul 2004 12:11:30 -0700, an*********@narod.ru (Socket) wrote:
aj*************@yahoo.com (ajay) wrote in message news:<2a**************************@posting.google. com>...
How to make a web page getting refreshed after a given time interval automatically.
HTML Code plz.

Tx
Ajay


example <HEAD>
........
example <META HTTP-EQUIV=Refresh CONTENT=15; URL=/>
........
example </HEAD>


Even ignoring the fact that this is a really bad idea, your HTML is
broken.

<META HTTP-EQUIV=Refresh CONTENT="15; URL=/">
or, to actually answer the poster's question:
<META HTTP-EQUIV=Refresh CONTENT=15>
.... to refresh the page the user is already on, not to refresh to the
root of the site.

-Claire
Jul 20 '05 #37

P: n/a
Brian <us*****@julietremblay.com.invalid> wrote:
Harlan Messinger wrote:
Brian wrote:
[re meta refresh pseudo header]
I'm trying to explain why I hate when page authors try to make my
browser into their application.
Now that's a load of garbage.


Rather belligerent tone you have there.


Yeah, I guess I get belligerent when someone hassles other people
mercilessly for offering features that he *personally* happens to
prefer not to use.
If someone wants to offer an application for which there's an
audience, and it can be done in a web browser, who are you or
anybody else to say they shouldn't do it? It's like saying I
shouldn't offer Java-based applications to anybody because some
people want to run native-code-only apps on their computers and
don't want to download the JRE.


Except that a Java application will advertise itself as such via http
headers, giving the user some idea of what to expect. They can decide
not to download it if they don't want to. Meta refresh does not
provide any such warning.


We were talking about making an application that relies on meta
refresh an opt-in feature. The words "Click here if you would like
this information to be updated automatically in your browser at
regular intervals" is a warning. I had agreed earlier in the thread
that the OP ought to provide this warning.
If you don't want to benefit from an application, then don't. Stay
away.
This isn't about my personal experience on the www. We discuss good
authoring practices in here. I'm pretty sure my comments have been
on-topic.


I didn't mean "stay away from here", I meant stay away from the
application. I'm not accusing you of being off-topic.
If you disagree, feel free to call me out.
I *agree* that the person offering the site should make clear up
front that the user is about to step *into* an application, so that
the user who doesn't want to can choose to avoid it.
Then why are you yelling at me?


I italicize two words for emphasis, and you call that yelling? THIS IS
YELLING.
But carrying on as though the person providing the application is
committing a grievous trespass is sheer belligerence.


Belligerence? I'm sorry, are you the kettle or the pot?


I'm reacting to your belligerence. You can, and do, dish it out and
then you get all put out when someone feeds it back to you.
--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 20 '05 #38

This discussion thread is closed

Replies have been disabled for this discussion.