469,352 Members | 2,150 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,352 developers. It's quick & easy.

META redirect

Hello, I have this code which redirects to
http://www.domain.com/link.html . . . but I want to specify the NUMBER
OF SECONDS before the site is redirected. Can somebody here help me . .
..

<meta http-equiv="Refresh"
content="4;url=http://www.domain.com/link.html">
PLEASE HELP. Thanks.

May 17 '06 #1
19 12738
On Wed, 17 May 2006 11:55:33 +0200, IveCal <iv*****@gmail.com> wrote:
I have this code which redirects to
http://www.domain.com/link.html . . . but I want to specify the NUMBER
OF SECONDS before the site is redirected. Can somebody here help me . .
.

<meta http-equiv="Refresh"
content="4;url=http://www.domain.com/link.html">


Had you Googled
<URL:http://www.google.com/search?q=meta+redirect+OR+refresh> within the
first few results you would have found:
<URL:http://www.htmlhelp.org/reference/html40/head/meta.html> and
<URL:http://www.seologic.com/faq/meta-refresh-tag.php>

Both have good information.
--
______PretLetters:
| weblog | http://www.pretletters.net/weblog/weblog.html |
| webontwerp | http://www.pretletters.net/html/webontwerp.html |
|zweefvliegen | http://www.pretletters.net/html/vliegen.html |
May 17 '06 #2
On 17 May 2006, IveCal wrote:
<meta http-equiv="Refresh"
content="4;url=http://www.domain.com/link.html">


Don't do that!
http://www.w3.org/QA/Tips/reback

--
The working man is dead - the acute accent is alive.
http://www.workingmansdeath.com/imag...kinoplakat.gif

May 17 '06 #3
Andreas Prilop wrote:
On 17 May 2006, IveCal wrote:
<meta http-equiv="Refresh"
content="4;url=http://www.domain.com/link.html">


Don't do that!
http://www.w3.org/QA/Tips/reback


While you are generally correct, I have an intance where the Refresh is
indeed the only way I know to accomplish what I want.

I want to create and display a formatted index of all my Web pages as an
HTML Web page, on the fly. I have an SSI script that creates the Web
page. However, to execute that script, a Web page that refers to it
must first be served by the server.

The user requests my <http://www.rossde.com/get_index.html>. This
displays a page telling the visitor to wait but that, if a new page does
not load soon, select the Go button.

<http://www.rossde.com/get_index.html> causes SSI script get_index.ksh
to execute, creating file index_list.html.
<http://www.rossde.com/get_index.html> also contains
<META HTTP-EQUIV="Refresh" CONTENT="1;
URL=http://www.rossde.com/index_list.html">
This then causes the generated <http://www.rossde.com/index_list.html>
to replace <http://www.rossde.com/get_index.html> in the browser window.

The 1 sec delay is to ensure that the script has indeed closed the
generated file before that file is served. However, I suspect that the
handling of SSI scripts by Apache would ensure that the file is closed
before even <http://www.rossde.com/get_index.html> loads.

--

David E. Ross
<http://www.rossde.com/>

Concerned about someone (e.g., Pres. Bush) snooping
into your E-mail? Use PGP.
See my <http://www.rossde.com/PGP/>
May 17 '06 #4
To further the education of mankind, "David E. Ross" <no****@nowhere.not>
vouchsafed:
Andreas Prilop wrote:
On 17 May 2006, IveCal wrote:
<meta http-equiv="Refresh"
content="4;url=http://www.domain.com/link.html">


Don't do that!
http://www.w3.org/QA/Tips/reback


While you are generally correct, I have an intance where the Refresh is
indeed the only way I know to accomplish what I want.


A regular link will work. If you want the first page 'replaced', a simple
way is to use javascript.

--
Neredbojias
Infinity has its limits.
May 17 '06 #5
David E. Ross wrote:
While you are generally correct, I have an intance where the Refresh is
indeed the only way I know to accomplish what I want.
As Jukka would say, "then stop wanting that".
I want to create and display a formatted index of all my Web pages as an
HTML Web page, on the fly. I have an SSI script that creates the Web
page. However, to execute that script, a Web page that refers to it
must first be served by the server.


This sounds liek a very roundabout way of displaying an index. Better to
link directly to index_list.html and include all of get_index.ksh's login
into it.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

May 18 '06 #6
Toby Inkster wrote:
David E. Ross wrote:
While you are generally correct, I have an intance where the Refresh is
indeed the only way I know to accomplish what I want.


As Jukka would say, "then stop wanting that".
I want to create and display a formatted index of all my Web pages as an
HTML Web page, on the fly. I have an SSI script that creates the Web
page. However, to execute that script, a Web page that refers to it
must first be served by the server.


This sounds liek a very roundabout way of displaying an index. Better to
link directly to index_list.html and include all of get_index.ksh's login
into it.


Before I saw your reply, I starting thinking along similar lines.
Instead of generating a complete HTML file and then using Refresh to
load that file, why not merely generate the body of the HTML file that
contains the SSI include statement. It works!! (Of course, I still
have to test it from other computers.)

No, I could not use JavaScript. While I can easily create UNIX Korn
scripts (I can almost think in UNIX Korn), I don't know JavaScript.

--

David E. Ross
<http://www.rossde.com/>

Concerned about someone (e.g., Pres. Bush) snooping
into your E-mail? Use PGP.
See my <http://www.rossde.com/PGP/>
May 19 '06 #7
Toby Inkster wrote:
... sounds liek a...
like. :-(
get_index.ksh's login into it.


logic. :-(

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

May 19 '06 #8

IveCal wrote:
Hello, I have this code which redirects to
http://www.domain.com/link.html . . . but I want to specify the NUMBER
OF SECONDS before the site is redirected. Can somebody here help me . .
.

<meta http-equiv="Refresh"
content="4;url=http://www.domain.com/link.html">
PLEASE HELP. Thanks.


As some in this topic have said, you could use a script instead, like:

<script type="javascript">
function timer()
{
setTimeout("redirect()", 4000);
//This will set the time until the redirect happens to 4 seconds, as
JavaScript uses milliseconds
}
function redirect()
{
location.href = "http://www.whateveryourwebpageis.com";
}

For this to work off of the loading of the page, you can just modify
the <body> element to look like this:
<body allofyourattributes onLoad="timer();">

Just replace 'allofyourattributes with the normal attributes of body.
This should have your page wait for 4 seconds after it is loaded to
redirect to your web page.

THIS IS JUST AN OPTIONAL ALTERNATIVE!

I have the honor to remain your most humble and Ob't Sv't in our war
against the King.

--
Patrick Reilly
1st Coy.
Colonel Seth Warner's Regiment

May 19 '06 #9
pe********************@gmail.com <pe********************@gmail.com>
scripsit:
THIS IS JUST AN OPTIONAL ALTERNATIVE!


You misspelled "yet another wrong answer". But thanks for SHOUTING: it is
such a clear indication of not making a useful contribution.

May 19 '06 #10
David E. Ross wrote:
Andreas Prilop wrote:
On 17 May 2006, IveCal wrote:
<meta http-equiv="Refresh"
content="4;url=http://www.domain.com/link.html">


Don't do that!
http://www.w3.org/QA/Tips/reback


While you are generally correct, I have an intance where the Refresh is
indeed the only way I know to accomplish what I want.

I want to create and display a formatted index of all my Web pages as an
HTML Web page, on the fly. I have an SSI script that creates the Web
page. However, to execute that script, a Web page that refers to it
must first be served by the server.

The user requests my <http://www.rossde.com/get_index.html>. This
displays a page telling the visitor to wait but that, if a new page does
not load soon, select the Go button.

<http://www.rossde.com/get_index.html> causes SSI script get_index.ksh
to execute, creating file index_list.html.
<http://www.rossde.com/get_index.html> also contains
<META HTTP-EQUIV="Refresh" CONTENT="1;
URL=http://www.rossde.com/index_list.html">
This then causes the generated <http://www.rossde.com/index_list.html>
to replace <http://www.rossde.com/get_index.html> in the browser window.

The 1 sec delay is to ensure that the script has indeed closed the
generated file before that file is served. However, I suspect that the
handling of SSI scripts by Apache would ensure that the file is closed
before even <http://www.rossde.com/get_index.html> loads.


Why are you writing the output to a file first instead of just sending
it directly to the client?
May 19 '06 #11

Jukka K. Korpela wrote:
pe********************@gmail.com <pe********************@gmail.com>
scripsit:
THIS IS JUST AN OPTIONAL ALTERNATIVE!


You misspelled "yet another wrong answer". But thanks for SHOUTING: it is
such a clear indication of not making a useful contribution.


The use of shouting in my post was because of my frustration with all
of the nitpickers within these forums that just take some of your post,
most of the time not even the actual code or answer, and then try to
exploit it. In this case, it just happens to be you, Mr. Korpela.

Now, when you say "yet another wrong answer", you seem to have some
self esteem problems, as this truly is a correct answer, although it is
an alternative answer to the original question. When one has many
options to do the same thing, they are able to save time by using the
shortest or most reliable method, and so that will have them more
satisfied. It seems that all of you nitpickers in these forums have
self-esteem problems, as you have to point out the smallest
discrepancies with the most disrespectful comments, so therefore I (and
many others) would believe you (plural) to be people that have been
incorrect for much of their life, but then learned something and
therefore became excessively arrogant by natural influence.

If you wish to keep your self-esteem up, don't put others down or make
yourself seem better, just use what knowledge you have for other's
betterment. Revenge is not the answer.
It's kind of funny to see that speech online (not sound files, you know
what I mean) has identified certain characters and modification of
characters as certain manners of speech.

Anyways, I therefore would like to declare 'end of conversation'.

I have the honor to remain your most humble and Ob't Sv't in our war
against the King.

--
Patrick Reilly
1st Coy.
Colonel Seth Warner's Regiment

May 20 '06 #12
pe********************@gmail.com:
Anyways, I therefore would like to declare 'end of conversation'.


Sorry to disappoint, but usenet threads are not the sort of threads
whose length you can determine by doubling half their length. EOT
calls invite followups.

--
Jock

May 21 '06 #13

John Dunlop wrote:
pe********************@gmail.com:
Anyways, I therefore would like to declare 'end of conversation'.


Sorry to disappoint, but usenet threads are not the sort of threads
whose length you can determine by doubling half their length. EOT
calls invite followups.

--
Jock


This is why I "would like to declare" the end of the conversation, not
I declare the end of this conversation.

I have the honor to remain your most humble and Ob't Sv't in our war
against the King.

--
Patrick Reilly
1st Coy.
Colonel Seth Warner's Regiment

May 21 '06 #14
begin quotation
from pe********************@gmail.com <pe********************@gmail.com>
in message <11**********************@j55g2000cwa.googlegroups .com>
posted at 2006-05-19T10:53
THIS IS JUST AN OPTIONAL ALTERNATIVE!


How well does your "alternative" work in browsers without Javascript
enabled?

--
___ _ _____ |*|
/ __| |/ / _ \ |*| Shawn K. Quinn
\__ \ ' < (_) | |*| sk*****@speakeasy.net
|___/_|\_\__\_\ |*| Houston, TX, USA
May 21 '06 #15
On Sun, 21 May 2006, Shawn K. Quinn wrote:
from pe********************@gmail.com <pe********************@gmail.com>
THIS IS JUST AN OPTIONAL ALTERNATIVE!


How well does your "alternative" work in browsers without Javascript
enabled?


Shhh! One of the advantages of authors doing annoying things in
Javascript is it's so easy for a reader to turn the whole thing off.
(SCNR).

Of course, his solution *should* have included an explicit link, so
that a reader who had turned off JS, yet wanted to take the
redirection at their leisure, could do so. Maybe the hon Usenaut
would want to take an interest in the WAI guidelines in that regard.

cheers

--

Beware of negative easements.
May 21 '06 #16

Alan J. Flavell wrote:
On Sun, 21 May 2006, Shawn K. Quinn wrote:
from pe********************@gmail.com <pe********************@gmail.com>
THIS IS JUST AN OPTIONAL ALTERNATIVE!


How well does your "alternative" work in browsers without Javascript
enabled?


Shhh! One of the advantages of authors doing annoying things in
Javascript is it's so easy for a reader to turn the whole thing off.
(SCNR).

Of course, his solution *should* have included an explicit link, so
that a reader who had turned off JS, yet wanted to take the
redirection at their leisure, could do so. Maybe the hon Usenaut
would want to take an interest in the WAI guidelines in that regard.

cheers

--

Beware of negative easements.


Now, about the use of JavaScript disabling:
JavaScript disabling is truly common in web browsers, although I
personally believe that it should not be used. Most sites on the web
use JavaScript for various functions, and therefore disabling it would
be detrimental to the original purpose. I know that people can do some
strange and annoying things with JavaScript, and that is why the
JavaScript disabling function was made in browsers, but those people
that wish to create fairly interactive web pages without having to
learn all of the complex syntaxes and other stuff within more complex
languages should not have to put up with this problem. JavaScript was
made to keep away from doing anything malicious, so why would you have
to turn it off to protect your computer? If anything, protect your
computer from certain aspects of it, such as running other scripts from
other languages that might be malicious. JavaScript cannot be
malicious on it's own, but if it calls another script (maybe a perl
script, or something else that can manipulate the user's actual files
or other things) that is malicious, then that is the case where you
want to stop it. If those brilliant people that design web browsers
could find a way to protect from this, or find a way to prompt the user
to see if they wish to let the JavaScript do this, then that would make
the life of many a JavaScript programmer much better.

I have the honor to remain your most humble and Ob't Sv't in our war
against the King.

--
Patrick Reilly
1st Coy.
Colonel Seth Warner's Regiment

May 22 '06 #17
On 22/05/2006 20:29, pe********************@gmail.com wrote:

[snip]
JavaScript disabling is truly common in web browsers, although I
personally believe that it should not be used. Most sites on the web
use JavaScript for various functions, and therefore disabling it
would be detrimental to the original purpose.
That's not much of an argument. Most sites serve images, too, or use
CSS, but they are just as optional as client-side scripting.

[snip]
[...] those people that wish to create fairly interactive web pages
without having to learn all of the complex syntaxes and other stuff
within more complex languages should not have to put up with this
problem.
If you think that ECMAScript and its derivatives aren't complex, you
probably aren't that familiar with it. There are certainly more
complicated languages, but ECMAScript is very expressive and far from
simplistic.

To your point, there is no 'problem' unless a site is made to depend on
scripting. But, perhaps more importantly, why should the user be forced
to endure something just because the author is unwilling or unable to
learn a different and more palatable approach?
JavaScript was made to keep away from doing anything malicious,
Hardly.
so why would you have to turn it off to protect your computer?
It's trivial to write annoying or show-stopping code.
If anything, protect your computer from certain aspects of it, [...]
That's why people who use MSIE may disable ActiveX; it tends to be more
of a concern than JScript. However, the XMLHTTP object is provided by
ActiveX, so even that limited action will necessitate the design and
implementation of a system that will undergo graceful degradation if the
author intends to use that increasingly popular feature.

[snip]

Throughout your post, you seem to have assumed that a user explicitly
disabling scripting is the only concern. However, that is far from the
case. One must also consider user agents (and not necessarily just
browsers) that lack any scripting support at all, and those that do not
provide all of the features necessary to implement a particular program.

Whether authors like it or not, client-side scripting should be
considered to be, and is, optional. With the exception of some special
interest sites, there should be no reliance upon it.
I have the honor to remain your most humble and Ob't Sv't in our war
against the King.
If you must post that, at least put it in your signature...
--


....and please fix your signature delimiter (dash-dash-space).

--
Michael Winter
Prefix subject with [News] before replying by e-mail.
May 22 '06 #18
begin quotation
from pe********************@gmail.com <pe********************@gmail.com>
in message <11**********************@g10g2000cwb.googlegroups .com>
posted at 2006-05-22T19:29
Alan J. Flavell wrote:
On Sun, 21 May 2006, Shawn K. Quinn wrote:
> from pe********************@gmail.com <pe********************@gmail.com>
> > THIS IS JUST AN OPTIONAL ALTERNATIVE! > How well does your "alternative" work in browsers without Javascript
> enabled?
Shhh! One of the advantages of authors doing annoying things in
Javascript is it's so easy for a reader to turn the whole thing off.
(SCNR). Of course, his solution *should* have included an explicit link, so
that a reader who had turned off JS, yet wanted to take the
redirection at their leisure, could do so. Maybe the hon Usenaut
would want to take an interest in the WAI guidelines in that regard.
Now, about the use of JavaScript disabling:
JavaScript disabling is truly common in web browsers, although I
personally believe that it should not be used.
Fortunately, you don't have any authority to turn Javascript on in my
browser when I don't ask for it.

If I don't trust you or I don't feel willing enough to extend some trust
to you, Javascript stays off for your sites.
Most sites on the web use JavaScript for various functions, and
therefore disabling it would be detrimental to the original purpose.
Most well-written sites on the Web will transform gracefully when
Javascript functionality is unavailable, since "World Wide Web" doesn't
necessarily mean "latest version of NetXploder with Javascript on".
JavaScript was made to keep away from doing anything malicious, so why
would you have to turn it off to protect your computer?


Javascript can be used to reveal certain information, such as browser
window size, screen resolution, operating system, browser name and
version, originating IP address, and probably other things. In
particular, if I take steps to conceal my true originating IP address
(Privoxy routed through Tor, for example), I do not want a Javascript
program "phoning home" with where I'm really coming from!

Not to mention, the security track record of at least some Javascript
engines hasn't been all that great.

--
___ _ _____ |*|
/ __| |/ / _ \ |*| Shawn K. Quinn
\__ \ ' < (_) | |*| sk*****@speakeasy.net
|___/_|\_\__\_\ |*| Houston, TX, USA
Jun 1 '06 #19

Shawn K. Quinn wrote:
begin quotation
from pe********************@gmail.com <pe********************@gmail.com>
in message <11**********************@g10g2000cwb.googlegroups .com>
posted at 2006-05-22T19:29
Alan J. Flavell wrote:
On Sun, 21 May 2006, Shawn K. Quinn wrote:
> from pe********************@gmail.com <pe********************@gmail.com>
> > THIS IS JUST AN OPTIONAL ALTERNATIVE! How well does your "alternative" work in browsers without Javascript
> enabled? Shhh! One of the advantages of authors doing annoying things in
Javascript is it's so easy for a reader to turn the whole thing off.
(SCNR). Of course, his solution *should* have included an explicit link, so
that a reader who had turned off JS, yet wanted to take the
redirection at their leisure, could do so. Maybe the hon Usenaut
would want to take an interest in the WAI guidelines in that regard.

Now, about the use of JavaScript disabling:
JavaScript disabling is truly common in web browsers, although I
personally believe that it should not be used.


Fortunately, you don't have any authority to turn Javascript on in my
browser when I don't ask for it.

If I don't trust you or I don't feel willing enough to extend some trust
to you, Javascript stays off for your sites.
Most sites on the web use JavaScript for various functions, and
therefore disabling it would be detrimental to the original purpose.


Most well-written sites on the Web will transform gracefully when
Javascript functionality is unavailable, since "World Wide Web" doesn't
necessarily mean "latest version of NetXploder with Javascript on".
JavaScript was made to keep away from doing anything malicious, so why
would you have to turn it off to protect your computer?


Javascript can be used to reveal certain information, such as browser
window size, screen resolution, operating system, browser name and
version, originating IP address, and probably other things. In
particular, if I take steps to conceal my true originating IP address
(Privoxy routed through Tor, for example), I do not want a Javascript
program "phoning home" with where I'm really coming from!

Not to mention, the security track record of at least some Javascript
engines hasn't been all that great.

--
___ _ _____ |*|
/ __| |/ / _ \ |*| Shawn K. Quinn
\__ \ ' < (_) | |*| sk*****@speakeasy.net
|___/_|\_\__\_\ |*| Houston, TX, USA


Dear sir,
This is why the human race is so contradictory. It builds things, and
then a part of it decides to use that object for detrimental purposes,
which therefore brings into play the downfall of that invention. Guess
what happened to nuclear technology!?! Ever since people noticed that
nuclear power can cause tremendous explosions and damage to humans,
they have decided that anything referring to nuclear is dangerous. Why
do you think that the MRI was named Magnetic Resonance Imaging. It was
originally called the NMR, standing for Nuclear Magnetic Resonance
Imaging, but because nuclear was said to be dangerous, no matter what
the technology was that used it, they had to change its name to MRI in
order to become popular.

I personally think, again, that only certain JavaScript functions
should be prevented, not the whole thing disabled. The access problems
that you spoke of could be disabled by the disabling of these
functions, while retaining the critical and useful parts of the
client-side scripting mechanism.

Submitted for your consideration.

I have the honor to remain your most humble and Ob't Sv't in our war
against the King.

--
Patrick Reilly
1st Coy.
Colonel Seth Warner's Regiment

Jun 1 '06 #20

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Steven Feil | last post: by
4 posts views Thread by Jim Hammond | last post: by
2 posts views Thread by Rob Meade | last post: by
8 posts views Thread by Taras_96 | last post: by
1 post views Thread by helraizer1 | last post: by
5 posts views Thread by Nick | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.