browser / refresh

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • vickie_raven

    browser / refresh

    is there any way to force a refresh of a page that a user visits??
    sorry i am still learning.

    vickie
  • Garp

    #2
    Re: browser / refresh


    "vickie_rav en" <vickie_raven@h otmail.com> wrote in message
    news:d78fb0d1e9 a4tn5h976sc1q47 ipvt9i46t@4ax.c om...[color=blue]
    > is there any way to force a refresh of a page that a user visits??
    > sorry i am still learning.
    >
    > vickie[/color]

    Setting the appropriate metatag should do it. But do it in PHP, or I'll have
    to have you ejected from the group:

    <?php
    echo '<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">';
    ?>

    Garp


    Comment

    • Pedro Graca

      #3
      Re: browser / refresh

      Garp wrote:[color=blue]
      > "vickie_rav en" <vickie_raven@h otmail.com> wrote in message
      > news:d78fb0d1e9 a4tn5h976sc1q47 ipvt9i46t@4ax.c om...[color=green]
      >> is there any way to force a refresh of a page that a user visits??
      >> sorry i am still learning.[/color][/color]
      [color=blue]
      > Setting the appropriate metatag should do it. But do it in PHP, or I'll have
      > to have you ejected from the group:
      >
      > <?php
      > echo '<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">';
      > ?>[/color]

      If that is what vickie really wants why not send HTTP headers instead?

      <?php
      // Date in the past
      header("Expires : Mon, 26 Jul 1997 05:00:00 GMT");

      // always modified
      header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");

      // HTTP/1.1
      header("Cache-Control: no-store, no-cache, must-revalidate");
      header("Cache-Control: post-check=0, pre-check=0", false);

      // HTTP/1.0
      header("Pragma: no-cache");
      ?>

      --
      USENET would be a better place if everybody read: : mail address :
      http://www.catb.org/~esr/faqs/smart-questions.html : is valid for :
      http://www.netmeister.org/news/learn2quote2.html : "text/plain" :
      http://www.expita.com/nomime.html : to 10K bytes :

      Comment

      • John Dunlop

        #4
        Re: browser / refresh

        vickie_raven wrote:
        [color=blue]
        > is there any way to force a refresh of a page that a user visits??[/color]

        No. Forget "force".

        --
        Jock

        Comment

        • Andy Hassall

          #5
          Re: browser / refresh

          On Fri, 28 May 2004 16:29:48 -0400, vickie_raven <vickie_raven@h otmail.com>
          wrote:
          [color=blue]
          >is there any way to force a refresh of a page that a user visits??[/color]

          You could dispatch goons to the user's house to threaten them with big sticks
          until they hit refresh. Otherwise, you're pretty much out of luck as far as
          forcing goes.

          Since PHP's job is finished once the page is sent to the user, you can't later
          do anything that could cause a refresh.

          You could send a Location header along with the page, but that just redirects
          instantly, and so the user would never see the page in the first place - hardly
          a refresh.

          An HTML solution (independent of PHP) is using a <meta> tag to request the
          browser to refresh after a certain amount of time. The browser doesn't have to
          honour this request.

          --
          Andy Hassall <andy@andyh.co. uk> / Space: disk usage analysis tool
          http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space

          Comment

          Working...