Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 11 of 11

Thread: meta refresh

  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Posts
    128
    Thanks
    0
    Thanked 0 Times in 0 Posts

    meta refresh

    to redirect I use

    <meta http-equiv="refresh" content="0;URL=anotherpage.htm" />

    but a while you can see the page (1 to 3 seconds) how can you really redirect at once, not to see at all the page ???

  • #2
    PlatinumProject
    Guest
    you can use javascript
    this is the fastes you can go tho i tried faster but it won't go

    <html>
    <head>
    <title>title?</title>

    <SCRIPT LANGUAGE="JavaScript">
    <!-- begin hiding JavaScript from old browsers
    // define redirect function
    function redirect(){
    parent.location.href="http://pp.8bit.co.uk"
    }
    // End hiding JavaScript -->
    </SCRIPT>

    </head>

    <body bgcolor="#FFFFFF">
    <h1>&nbsp;</h1>


    <p>&nbsp;</p>

    <SCRIPT LANGUAGE="JavaScript">
    <!-- Hide script from old browsers
    // set timeout to redirect after 1 seconds
    setTimeout("redirect()",-1000)
    //-->
    </SCRIPT>

    </body>
    </html>

  • #3
    Regular Coder
    Join Date
    Jul 2002
    Posts
    128
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ok

    thank you !!
    I must try it !

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,649
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Don't use meta refresh if you're planning on submitting to search engines or you will be one sorry mofo.
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

  • #5
    Regular Coder
    Join Date
    Jul 2002
    Posts
    128
    Thanks
    0
    Thanked 0 Times in 0 Posts

    just for

    it is just when I work on the site I redirect to a page for a short moment :-))

    the problem with your Javascript it seems not to be recognized by Mozilla, and ... this silly Opera

    any Idea ?

  • #6
    PlatinumProject
    Guest
    hold on i will see if i can get it to work

  • #7
    Regular Coder
    Join Date
    Jul 2002
    Posts
    128
    Thanks
    0
    Thanked 0 Times in 0 Posts

    on design time

    I write it on design time , when I update my web site... I can block it a moment, but Opera and mozilla cross through ...

    I have put all in one line into the head
    ---------------------------------------------------

    function redirect(){parent.location.href = 'maintenance.htm'} setTimeout('redirect()', -1000)

    -------------------------------------------------

    and for netscape and explorer it is incredible fast ! perfect !!

    if you can find a solution (in one line :-)))

    I am not good enough with javascript

    thank you again

  • #8
    PlatinumProject
    Guest
    Opera might not understand the -1000 try changing it to 0 and see who it goees

  • #9
    Regular Coder
    Join Date
    Jul 2002
    Posts
    128
    Thanks
    0
    Thanked 0 Times in 0 Posts

    right !

    yes ! that was the point , opera and mozilla want a 0

    thank you

  • #10
    Regular Coder
    Join Date
    Sep 2002
    Location
    self.location
    Posts
    181
    Thanks
    0
    Thanked 0 Times in 0 Posts
    "if you can find a solution (in one line :-))) "


    one line:

    <script>
    <!--
    top.location.replace("nextpage.html")
    //-->
    </script>

    ...

    No need to call any functions. The redirect should be placed as close to the top of the page as possible (after any title and meta tags).

    This will also solve the BACK BUTTON problem: if you don't use replace(), pressing the back-button continually brings you back to the redirected page (aargh!).

    I think Zoobie's warning about META refresh also applies to Javascript redirects? I've heard that search engines ignore pages which use JS redirects, but don't quote me on that.

    Personally I still use the JS method whenever needed, but also use

    <noscript><meta http-equiv="refresh" content="0;URL=anotherpage.htm"></noscript>

    To target browsers which don't have JS turned on. Btw, embedding <meta> inside <noscript> doesn't validate.

  • #11
    Regular Coder
    Join Date
    Jul 2002
    Posts
    128
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Ipon !

    one line ! well done !

    I try it at once !

    thank you


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •