search

Home  >  Q&A  >  body text

Is it possible to use a sub-one second delay on header("refresh:...") using PHP?

I know you can refresh the page immediately in PHP using header("refresh: 0;");

You can also set your own delay, which is 3 seconds, as shown below

header("refresh: 3;");

My question is, is it possible to set the delay to less than one second, a tenth of a second?

header("Refresh: 0.1;");

P粉009186469P粉009186469242 days ago469

reply all(2)I'll reply

  • P粉129168206

    P粉1291682062024-03-28 13:22:19

    header("refresh: 0.9;"); will be refreshed immediately, header("refresh: 1.9;"); will be refreshed after 1 second, and so on. Decimal points are ignored.

    reply
    0
  • P粉567112391

    P粉5671123912024-03-28 12:36:01

    Tried it, it works

    For example: header("Refresh: 0.25;"); header("Refresh: 0.1;"); header("Refresh: 0.75;") " ); header("refresh: 0.5;"); Everything seems to work.

    reply
    0
  • Cancelreply