Refresh page only once

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

    #1

    Refresh page only once

    I want to reload a page only once. Therefor meta refresh is not
    suitable, because then it refreshes every x seconds. Is there a
    possibility to refresh only once?

    regards,
    Lex Ouburg
  • Richard Cornford

    #2
    Re: Refresh page only once

    Lex wrote:[color=blue]
    > I want to reload a page only once. Therefor meta refresh
    > is not suitable, because then it refreshes every x seconds.
    > Is there a possibility to refresh only once?[/color]

    Probably, but your reason for wanting to do this is probably as a hack
    to 'solve' some other problem that would be better addressed directly.

    Richard.


    Comment

    • Grant Wagner

      #3
      Re: Refresh page only once

      Lex wrote:
      [color=blue]
      > I want to reload a page only once. Therefor meta refresh is not
      > suitable, because then it refreshes every x seconds. Is there a
      > possibility to refresh only once?
      >
      > regards,
      > Lex Ouburg[/color]

      <a href="#" onclick="window .reload();retur n false;">Reload</a>

      Of course, the user could just click the Reload button on their
      browser, duplicating that functionality seems a bit silly.

      --
      Grant Wagner <gwagner@agrico reunited.com>
      comp.lang.javas cript FAQ - http://jibbering.com/faq

      Comment

      • Ian L

        #4
        Re: Refresh page only once

        The window.location .reload() will reload the window. You could try
        working with cookies or another window to keep track of the number of
        time it has been refreshed.

        Comment

        • Grant Wagner

          #5
          Re: Refresh page only once

          Grant Wagner wrote:
          [color=blue]
          > Lex wrote:
          >[color=green]
          > > I want to reload a page only once. Therefor meta refresh is not
          > > suitable, because then it refreshes every x seconds. Is there a
          > > possibility to refresh only once?
          > >
          > > regards,
          > > Lex Ouburg[/color]
          >
          > <a href="#" onclick="window .reload();retur n false;">Reload</a>
          >
          > Of course, the user could just click the Reload button on their
          > browser, duplicating that functionality seems a bit silly.[/color]

          No it won't. Of course I meant:

          <a href="#" onclick="window .location.reloa d();return
          false;">Reload</a>
          or
          <a href="#" onclick="window .location.reloa d(true);return
          false;">Reload</a> (which is supposed to force a GET regardless of
          whether the document is currently cached or not)

          Apologies for any problems this may have caused.

          --
          Grant Wagner <gwagner@agrico reunited.com>
          comp.lang.javas cript FAQ - http://jibbering.com/faq

          Comment

          Working...