Delaying on server side

Discussion in 'ASP General' started by Agoston Bejo, Feb 14, 2005.

  1. Agoston Bejo

    Agoston Bejo Guest

    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?
     
    Agoston Bejo, Feb 14, 2005
    #1
    1. Advertising

  2. Agoston Bejo

    Evertjan. Guest

    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)
     
    Evertjan., Feb 14, 2005
    #2
    1. Advertising

  3. 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.
     
    Bob Barrows [MVP], Feb 14, 2005
    #3
  4. Agoston Bejo

    Roland Hall Guest

    "Agoston Bejo" <> wrote in message
    news:%...
    : 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
     
    Roland Hall, Feb 15, 2005
    #4
  5. Agoston Bejo

    Agoston Bejo Guest

    "Roland Hall" <nobody@nowhere> wrote in message
    news:#...
    > "Agoston Bejo" <> wrote in message
    > news:%...
    > : 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
    >
    >
    >
     
    Agoston Bejo, Feb 15, 2005
    #5
  6. Agoston Bejo

    Roland Hall Guest

    "Agoston Bejo" <> wrote in message
    news:...
    :
    : "Roland Hall" <nobody@nowhere> wrote in message
    : news:#...
    : > "Agoston Bejo" <> wrote in message
    : > news:%...
    : > : 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
     
    Roland Hall, Feb 15, 2005
    #6
  7. Agoston Bejo

    Evertjan. Guest

    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)
     
    Evertjan., Feb 15, 2005
    #7
  8. Agoston Bejo

    Roland Hall Guest

    "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
     
    Roland Hall, Feb 15, 2005
    #8
  9. Agoston Bejo

    Evertjan. Guest

    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)
     
    Evertjan., Feb 15, 2005
    #9
  10. Agoston Bejo

    Roland Hall Guest

    "Evertjan." <> 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
     
    Roland Hall, Feb 15, 2005
    #10
  11. Roland Hall wrote:
    <snipped>

    > : 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?


    Most sites that use META refresh also provide a separate URL on the page
    with text such as "If you are not redirected to a new page in 5 seconds,
    then click _here_."

    I don't hesitate to use META refresh but always also provide the
    click-through URL. One reason is that, if the user hits the <esc> key
    before the refresh occurs, then the URL won't change. <esc> (and
    possibly other keys) kills the refresh; the click-through lets the user
    recover.
     
    Michael D. Kersey, Feb 16, 2005
    #11
  12. Agoston Bejo

    Adrienne Guest

    Gazing into my crystal ball I observed "Michael D. Kersey"
    <> writing in
    news::

    > Roland Hall wrote:
    ><snipped>
    >
    >> : 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?

    >
    > Most sites that use META refresh also provide a separate URL on the
    > page with text such as "If you are not redirected to a new page in 5
    > seconds, then click _here_."
    >
    > I don't hesitate to use META refresh but always also provide the
    > click-through URL. One reason is that, if the user hits the <esc> key
    > before the refresh occurs, then the URL won't change. <esc> (and
    > possibly other keys) kills the refresh; the click-through lets the user
    > recover.
    >


    Additionally, one can set one's browser to disallow redirection.

    --
    Adrienne Boswell
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
     
    Adrienne, Feb 22, 2005
    #12
  13. Agoston Bejo

    Roland Hall Guest

    "Adrienne" wrote in message
    news:Xns9605BCD177E9arbpenyahoocom@207.115.63.158...
    : Gazing into my crystal ball I observed "Michael D. Kersey"
    : <> writing in
    : news::
    :
    : > Roland Hall wrote:
    : ><snipped>
    : >
    : >> : 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?
    : >
    : > Most sites that use META refresh also provide a separate URL on the
    : > page with text such as "If you are not redirected to a new page in 5
    : > seconds, then click _here_."
    : >
    : > I don't hesitate to use META refresh but always also provide the
    : > click-through URL. One reason is that, if the user hits the <esc> key
    : > before the refresh occurs, then the URL won't change. <esc> (and
    : > possibly other keys) kills the refresh; the click-through lets the user
    : > recover.
    : >
    :
    : Additionally, one can set one's browser to disallow redirection.

    Are you referring to client-side redirection?

    --
    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
     
    Roland Hall, Feb 22, 2005
    #13
  14. Agoston Bejo

    Adrienne Guest

    Gazing into my crystal ball I observed "Roland Hall" <nobody@nowhere>
    writing in news::

    > "Adrienne" wrote in message
    > news:Xns9605BCD177E9arbpenyahoocom@207.115.63.158...
    >: Gazing into my crystal ball I observed "Michael D. Kersey"
    >: <> writing in
    >: news::
    >:
    >: > Roland Hall wrote: <snipped>
    >: >
    >: >> : 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?
    >: >
    >: > Most sites that use META refresh also provide a separate URL on the
    >: > page with text such as "If you are not redirected to a new page in 5
    >: > seconds, then click _here_."
    >: >
    >: > I don't hesitate to use META refresh but always also provide the
    >: > click-through URL. One reason is that, if the user hits the <esc>
    >: > key before the refresh occurs, then the URL won't change. <esc> (and
    >: > possibly other keys) kills the refresh; the click-through lets the
    >: > user recover.
    >: >
    >:
    >: Additionally, one can set one's browser to disallow redirection.
    >
    > Are you referring to client-side redirection?
    >


    Nope, both client side and server side.

    Opera preferences lets you disable automatic redirection. For client side,
    it just sits there, for server side, you get Object Moved - Page is
    available here (with a link to the new page).

    --
    Adrienne Boswell
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
     
    Adrienne, Feb 22, 2005
    #14
  15. Agoston Bejo

    Evertjan. Guest

    Adrienne wrote on 22 feb 2005 in microsoft.public.inetserver.asp.general:

    >>: Additionally, one can set one's browser to disallow redirection.
    >>
    >> Are you referring to client-side redirection?
    >>

    >
    > Nope, both client side and server side.
    >


    There is NO serverside redirection!!!

    [asp] response.redirect "/"

    just sends a header asking the browser to redirect.

    [asp Server.transfer should not be called redirecting]

    --
    Evertjan.
    The Netherlands.
    (Replace all crosses with dots in my emailaddress)
     
    Evertjan., Feb 22, 2005
    #15
  16. Agoston Bejo

    Iain Norman Guest

    On Tue, 15 Feb 2005 18:15:39 -0600, "Michael D. Kersey"
    <> wrote:

    >Roland Hall wrote:
    ><snipped>
    >
    >> : 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?

    >
    >Most sites that use META refresh also provide a separate URL on the page
    >with text such as "If you are not redirected to a new page in 5 seconds,
    >then click _here_."
    >
    >I don't hesitate to use META refresh but always also provide the
    >click-through URL. One reason is that, if the user hits the <esc> key
    >before the refresh occurs, then the URL won't change. <esc> (and
    >possibly other keys) kills the refresh; the click-through lets the user
    >recover.


    Search engines won't thank you for a meta refresh keep in mind though.

    --
    Iain Norman | http://www.eliteforum.org
     
    Iain Norman, Feb 22, 2005
    #16
  17. Agoston Bejo

    Adrienne Guest

    Gazing into my crystal ball I observed Iain Norman <>
    writing in news::

    > On Tue, 15 Feb 2005 18:15:39 -0600, "Michael D. Kersey"
    ><> wrote:
    >
    >>Roland Hall wrote:
    >><snipped>
    >>
    >>> : 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?

    >>
    >>Most sites that use META refresh also provide a separate URL on the
    >>page with text such as "If you are not redirected to a new page in 5
    >>seconds, then click _here_."
    >>
    >>I don't hesitate to use META refresh but always also provide the
    >>click-through URL. One reason is that, if the user hits the <esc> key
    >>before the refresh occurs, then the URL won't change. <esc> (and
    >>possibly other keys) kills the refresh; the click-through lets the user
    >>recover.

    >
    > Search engines won't thank you for a meta refresh keep in mind though.
    >


    They don't like a response.redirect either



    --
    Adrienne Boswell
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
     
    Adrienne, Feb 22, 2005
    #17
  18. Agoston Bejo

    Roland Hall Guest

    "Adrienne" wrote in message
    news:Xns9605617D6EBD3arbpenyahoocom@207.115.63.158...
    : Gazing into my crystal ball I observed Iain Norman <>
    : writing in news::
    :
    : > Search engines won't thank you for a meta refresh keep in mind though.
    : >
    :
    : They don't like a response.redirect either

    Is there anything they do like? Better yet, is there anything they do like
    today they will like tomorrow? When did it become fashionable to control
    the layout/design of the sites of others?

    Why is it, "don't do that....because...._______________.... doesn't like it"
    rather than, "___________ doesn't know how to work with your site when you
    do that. Let's look at a way to make it work so you can do it like that."

    --
    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
     
    Roland Hall, Feb 22, 2005
    #18
  19. Agoston Bejo

    Roland Hall Guest

    "Evertjan." <> wrote in message
    news:Xns960593573D7F4eejj99@194.109.133.29...
    : Adrienne wrote on 22 feb 2005 in microsoft.public.inetserver.asp.general:
    :
    : >>: Additionally, one can set one's browser to disallow redirection.
    : >>
    : >> Are you referring to client-side redirection?
    : >>
    : >
    : > Nope, both client side and server side.
    : >
    :
    : There is NO serverside redirection!!!
    :
    : [asp] response.redirect "/"
    :
    : just sends a header asking the browser to redirect.
    :
    : [asp Server.transfer should not be called redirecting]

    Are you spanking the thread? (O:=

    --
    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
     
    Roland Hall, Feb 22, 2005
    #19
  20. Agoston Bejo

    Adrienne Guest

    Gazing into my crystal ball I observed "Roland Hall" <nobody@nowhere>
    writing in news::

    > "Adrienne" wrote in message
    > news:Xns9605617D6EBD3arbpenyahoocom@207.115.63.158...
    >: Gazing into my crystal ball I observed Iain Norman <>
    >: writing in news::
    >:
    >: > Search engines won't thank you for a meta refresh keep in mind
    >: > though.
    >: >
    >:
    >: They don't like a response.redirect either
    >
    > Is there anything they do like? Better yet, is there anything they do
    > like today they will like tomorrow? When did it become fashionable to
    > control the layout/design of the sites of others?
    >
    > Why is it, "don't do that....because...._______________.... doesn't
    > like it" rather than, "___________ doesn't know how to work with your
    > site when you do that. Let's look at a way to make it work so you can
    > do it like that."
    >


    They don't like presentational markup either, no I should say they prefer
    well formed Strict documents.

    Move the presenational stuff to external stylesheets, and javascript
    enhancements to external scripts, use tables for tabular data, and they
    seem to gobble it up.

    I don't do anything else (doorways pages, hidden text, etc) and I have
    always had good SERPs. I had one client that was #1 in Google for a year
    and a half, until they decided to put back the presenational stuff, and now
    they're off the map entirely.

    --
    Adrienne Boswell
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
     
    Adrienne, Feb 22, 2005
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rootz Anabo
    Replies:
    13
    Views:
    911
    Nicolas Matringe
    Apr 9, 2004
  2. dcreddy1980

    problem in delaying the input bit??

    dcreddy1980, Dec 15, 2004, in forum: VHDL
    Replies:
    6
    Views:
    426
    dcreddy1980
    Dec 15, 2004
  3. Marcin
    Replies:
    2
    Views:
    638
    Christopher Benson-Manica
    Apr 16, 2004
  4. Sargo

    time delaying?

    Sargo, Jan 8, 2005, in forum: C++
    Replies:
    5
    Views:
    500
    Victor Bazarov
    Jan 9, 2005
  5. daokfella

    Delaying autopostbacks on dropdownlists

    daokfella, Jun 3, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    384
    bruce barker
    Jun 3, 2008
Loading...

Share This Page