Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Delaying on server side

Reply
Thread Tools

Delaying on server side

 
 
Agoston Bejo
Guest
Posts: n/a
 
      02-14-2005
Hi,
I would like to achieve the equivalent of META REFRESH but without the HTML
meta refresh and without JavaScript. In other words, on server side I would
like to wait some seconds, then redirect the page. Is there any way to do
this?


 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      02-14-2005
Agoston Bejo wrote on 14 feb 2005 in
microsoft.public.inetserver.asp.general:
> I would like to achieve the equivalent of META REFRESH but without the
> HTML meta refresh and without JavaScript. In other words, on server
> side I would like to wait some seconds, then redirect the page. Is
> there any way to do this?


No, redirecting is always clientside.

even serverside response.redirect "/"

Cannot be sent after any html is sent, as it
simply sets a redirect header in the message to the client.



--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      02-14-2005
Agoston Bejo wrote:
> Hi,
> I would like to achieve the equivalent of META REFRESH but without
> the HTML meta refresh and without JavaScript. In other words, on
> server side I would like to wait some seconds, then redirect the
> page. Is there any way to do this?


You can use server.transfer to accomplish the client-less redirect, but
making the server wait without causing 100% CPU usage (definitely not
recommended) is not possible. Web servers are designed to serve requests,
not sit there waiting, refusing pending requests as it waits..

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


 
Reply With Quote
 
Roland Hall
Guest
Posts: n/a
 
      02-15-2005
"Agoston Bejo" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
: Hi,
: I would like to achieve the equivalent of META REFRESH but without the
HTML
: meta refresh and without JavaScript. In other words, on server side I
would
: like to wait some seconds, then redirect the page. Is there any way to do
: this?

Why? What is wrong with those two options?

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp



 
Reply With Quote
 
Agoston Bejo
Guest
Posts: n/a
 
      02-15-2005

"Roland Hall" <nobody@nowhere> wrote in message
news:#(E-Mail Removed)...
> "Agoston Bejo" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> : Hi,
> : I would like to achieve the equivalent of META REFRESH but without the
> HTML
> : meta refresh and without JavaScript. In other words, on server side I
> would
> : like to wait some seconds, then redirect the page. Is there any way to

do
> : this?
>
> Why? What is wrong with those two options?


The <meta refresh> method is not recommended by the World Wide Web
consortium (see http://www.w3schools.com/html/html_meta.asp).

The JavaScript method requires the client to enable JavaScript (which is
quite a reasonable expectation, but why require it if not neccessary?).

Actually I used <meta refresh> at the end.

Agoston.

>
> --
> Roland Hall
> /* This information is distributed in the hope that it will be useful, but
> without any warranty; without even the implied warranty of merchantability
> or fitness for a particular purpose. */
> Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
> WSH 5.6 Documentation -

http://msdn.microsoft.com/downloads/list/webdev.asp
> MSDN Library - http://msdn.microsoft.com/library/default.asp
>
>
>



 
Reply With Quote
 
Roland Hall
Guest
Posts: n/a
 
      02-15-2005
"Agoston Bejo" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
:
: "Roland Hall" <nobody@nowhere> wrote in message
: news:#(E-Mail Removed)...
: > "Agoston Bejo" <(E-Mail Removed)> wrote in message
: > news:%(E-Mail Removed)...
: > : Hi,
: > : I would like to achieve the equivalent of META REFRESH but without the
: > HTML
: > : meta refresh and without JavaScript. In other words, on server side I
: > would
: > : like to wait some seconds, then redirect the page. Is there any way to
: do
: > : this?
: >
: > Why? What is wrong with those two options?
:
: The <meta refresh> method is not recommended by the World Wide Web
: consortium (see http://www.w3schools.com/html/html_meta.asp).
:
: The JavaScript method requires the client to enable JavaScript (which is
: quite a reasonable expectation, but why require it if not neccessary?).
:
: Actually I used <meta refresh> at the end.

<%@ Language=VBScript %>
<%
Option Explicit
Response.Buffer = True
Response.AddHeader "Refresh","5;URL=http://domain.com/someotherpage.asp"
Response.Write "Redirecting in 5 seconds..."
%>

http://kiddanger.com/lab/delayedredirect.asp

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp


 
Reply With Quote
 
Evertjan.
Guest
Posts: n/a
 
      02-15-2005
Roland Hall wrote on 15 feb 2005 in
microsoft.public.inetserver.asp.general:

> <%@ Language=VBScript %>
> <%
> Option Explicit
> Response.Buffer = True
> Response.AddHeader "Refresh","5;URL=http://domain.com/someotherpage.asp"
> Response.Write "Redirecting in 5 seconds..."
> %>
>


Awesome !! Why didn't I know that?

btw: why the Option Explicit?

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

 
Reply With Quote
 
Roland Hall
Guest
Posts: n/a
 
      02-15-2005
"Evertjan." wrote in message news:Xns95FE85A13841Aeejj99@194.109.133.29...
: Roland Hall wrote on 15 feb 2005 in
: microsoft.public.inetserver.asp.general:
:
: > <%@ Language=VBScript %>
: > <%
: > Option Explicit
: > Response.Buffer = True
: > Response.AddHeader "Refresh","5;URL=http://domain.com/someotherpage.asp"
: > Response.Write "Redirecting in 5 seconds..."
: > %>
: >
:
: Awesome !! Why didn't I know that?

I give up.

: btw: why the Option Explicit?

Sorry, habit.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp



 
Reply With Quote
 
Evertjan.
Guest
Posts: n/a
 
      02-15-2005
Roland Hall wrote on 15 feb 2005 in
microsoft.public.inetserver.asp.general:

> "Evertjan." wrote in message
> news:Xns95FE85A13841Aeejj99@194.109.133.29...
>: Roland Hall wrote on 15 feb 2005 in
>: microsoft.public.inetserver.asp.general:
>:
>: > <%@ Language=VBScript %>
>: > <%
>: > Option Explicit
>: > Response.Buffer = True
>: > Response.AddHeader
>: > "Refresh","5;URL=http://domain.com/someotherpage.asp"
>: > Response.Write "Redirecting in 5 seconds..." %>
>: >
>:
>: Awesome !! Why didn't I know that?
>
> I give up.
>


I was serious !! I didn't know this as a header.

[and I am seldom serious]

I will contemplate about converting my pages that have metas.

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

 
Reply With Quote
 
Roland Hall
Guest
Posts: n/a
 
      02-15-2005
"Evertjan." <(E-Mail Removed)> wrote in message
news:Xns95FED1029AA7Beejj99@194.109.133.29...
: Roland Hall wrote on 15 feb 2005 in
: microsoft.public.inetserver.asp.general:
:
: > "Evertjan." wrote in message
: > news:Xns95FE85A13841Aeejj99@194.109.133.29...
: >: Roland Hall wrote on 15 feb 2005 in
: >: microsoft.public.inetserver.asp.general:
: >:
: >: > <%@ Language=VBScript %>
: >: > <%
: >: > Option Explicit
: >: > Response.Buffer = True
: >: > Response.AddHeader
: >: > "Refresh","5;URL=http://domain.com/someotherpage.asp"
: >: > Response.Write "Redirecting in 5 seconds..." %>
: >: >
: >:
: >: Awesome !! Why didn't I know that?
: >
: > I give up.
: >
:
: I was serious !! I didn't know this as a header.

I know you were and so was I. I have no idea why you didn't know it. I've
never seen it done before either. The only issue here, as I am buffering is
dealing with Response.Flush where AddHeader can actually be anywhere in the
page when buffering but it has to come before a Flush. I call it the toilet
function. You can change your content but once you flush, that's it!

: [and I am seldom serious]

No reason to be serious here. (O:=

:
: I will contemplate about converting my pages that have metas.

After reading the W3C re: META refresh, I never found a difinitive reason
why it should not be used. It said, "some browsers may not be able to use
it". Well, that's clear as mud. Which browsers and is this still relative
or is it just because the client cannot be controlled?

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delaying autopostbacks on dropdownlists daokfella ASP .Net 1 06-03-2008 07:56 PM
time delaying? Sargo C++ 5 01-09-2005 04:11 PM
problem in delaying the input bit?? dcreddy1980 VHDL 6 12-15-2004 02:43 PM
delaying video capture preview Marcin C++ 2 04-16-2004 11:48 AM
Help needed in delaying signals... in my design Rootz Anabo VHDL 13 04-09-2004 06:46 AM



Advertisments