Results 1 to 4 of 4

Thread: client-pull delay

  1. #1
    Join Date
    Apr 2012
    Location
    Central New Jersey
    Posts
    286
    Thanks
    95
    Thanked 3 Times in 3 Posts

    Default client-pull delay

    The header in http://www.njsexcrimes.com/page.php?here=index includes this line:
    Code:
    <meta http-equiv="refresh" content="0;url=http://www.MarainLaw.com/page.php?here=sexual-assault-in-new-jersey" />
    I want visitors to njsexcrimes.com to be redirected immediately to the specified page in marainlaw.com. The client-pull statement actually works, but only after a delay of several seconds. I am wondering how I might be able to eliminate the delay.

    Thank you, as always.

    A.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    As far as I know, there's no way way of being certain where that delay arises from, obviously not from the content value of the tag. If the tag is the first tag encountered in the head, it wouldn't be the browser's page parser either, at least probably not.

    However, the meta redirect should be avoided whenever possible because not all user agents respond to it, and some can actually turn it off.

    Since it is a PHP page that you are redirecting from, why not use a PHP header redirect? To do so, make this the very first thing on the njsexcrimes.com/page.php?here=index page:

    PHP Code:
    <?php
      header
    ('Location:http://www.MarainLaw.com/page.php?here=sexual-assault-in-new-jersey');
      die();
    ?>
    Then it will be a server side redirect. It might not be any faster, but it will no longer be subject to any delay or negation on the client side.

    A mod rewrite could also be used, but that would require an htaccess file or server configuration change.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    marain (09-24-2014)

  4. #3
    Join Date
    Apr 2012
    Location
    Central New Jersey
    Posts
    286
    Thanks
    95
    Thanked 3 Times in 3 Posts

    Default

    John, your information is incredibly on point. Thank you.

    Follow up questions (no good deed goes unpunished): Do you have any recommendation as to which of the techniques to use: php header versus .htaccess? Would it make any sense to use both? Regardless, I'll implement one or the other, or both, and remove the tag.

    Thanks again.

    A.

  5. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I honestly don't know. If I had to guess I would think that the PHP header - if it were the first thing in the page being redirected from, would be the most nearly uniform. The other server side methods could be quicker or slower depending upon server load as they require a lookup. But I think the results would vary for any of the server side methods and that whatever would generally slow down one would slow another. If there is a large lookup table, that might have to be read before any on page redirect. If so, one method or the other would be better perhaps only if used exclusively. The only glaring advantage with .htaccess and other mod rewrite methods are that even non-server language pages (like .htm, .html, .js, .css, etc.) can be redirected.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Similar Threads

  1. Pull down menu help
    By scubabert in forum JavaScript
    Replies: 0
    Last Post: 12-20-2007, 02:53 PM
  2. Help to pull apart a script please?
    By munkynpunky in forum PHP
    Replies: 2
    Last Post: 08-05-2007, 04:54 PM
  3. Pull Down Menu
    By vikysaran in forum Looking for such a script or service
    Replies: 0
    Last Post: 05-23-2007, 07:07 AM
  4. Pull Down Menu
    By mturus in forum JavaScript
    Replies: 0
    Last Post: 10-28-2006, 11:59 PM
  5. Using onMouseover to pull xml value to fixedtooltip
    By Snaven in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 01-05-2006, 11:11 PM

Bookmarks

Posting Permissions

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