#1

  1. Join Date
    Sep 2013
    Location
    Lahore, Pakistan
    Posts
    74
    Rep Power
    2

    Angry Redirection with time


    How to add refresh tag to login.php
    that you are going to redirect Home Page : 5 - 4 -3 -2 -1

    header ('location: index.php');
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2013
    Posts
    58
    Rep Power
    1
    Is the counter supposed to live-update with each second of the countdown?

    I don't think PHP can do that effectively... probably more of a Javascript client-side thing.
  4. #3
  5. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,959
    Rep Power
    1014
    Hi,

    this is easy: Just don't do it.

    I know that deferred redirects are one of those "cool features" everybody thinks they should implement -- just like everybody in the 90s thought they need visitor counters, blinking fonts and "under construction" signs. But if you actually think about it, the idea turns out to be crap.

    From a user's perspective, a noticeable redirect feels like being slapped in the face. Seriously. Who are you to kill the current page while I'm viewing it and unaskedly take me to some other page? This technique also means that the page cannot contain anything useful, because any action the user takes may be interrupted at a any time. In other words, the poor user has sit passively in front of the screen and wait for the friggin' counter to reach zero. Who on earth does that in the 21st century?

    Counters themselves are already very problematic. I can't think of any legitimate use case except of maybe games. If you absolutely definitely need them, at least make the site interactive so that people can do something while they wait. Use Ajax instead of redirects.

    If you wanna keep your users, don't get on their nerves with stupid gadgets from the 90s.
    The 6 worst sins of security ē How to (properly) access a MySQL database with PHP

    Why canít I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".
  6. #4

  7. Join Date
    Sep 2013
    Location
    Lahore, Pakistan
    Posts
    74
    Rep Power
    2
    Originally Posted by Jacques1
    Hi,

    this is easy: Just don't do it.

    I know that deferred redirects are one of those "cool features" everybody thinks they should implement -- just like everybody in the 90s thought they need visitor counters, blinking fonts and "under construction" signs. But if you actually think about it, the idea turns out to be crap.

    From a user's perspective, a noticeable redirect feels like being slapped in the face. Seriously. Who are you to kill the current page while I'm viewing it and unaskedly take me to some other page? This technique also means that the page cannot contain anything useful, because any action the user takes may be interrupted at a any time. In other words, the poor user has sit passively in front of the screen and wait for the friggin' counter to reach zero. Who on earth does that in the 21st century?

    Counters themselves are already very problematic. I can't think of any legitimate use case except of maybe games. If you absolutely definitely need them, at least make the site interactive so that people can do something while they wait. Use Ajax instead of redirects.

    If you wanna keep your users, don't get on their nerves with stupid gadgets from the 90s.
    how to do it do you have any idea
  8. #5
  9. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,959
    Rep Power
    1014
    Please don't full-quote my replies. The text is right above your post, so no need to repeat everything.

    What exactly is your question? I suggested to either give up the countdown completely or to at least use Ajax. What did you choose? What are you struggling with?

    Please note that we don't hand out complete solution. So if you want help, you need to be specific.
    The 6 worst sins of security ē How to (properly) access a MySQL database with PHP

    Why canít I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".

IMN logo majestic logo threadwatch logo seochat tools logo