By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,176 Members | 1,070 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,176 IT Pros & Developers. It's quick & easy.

Refresh page only once

P: n/a
Lex
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
Jul 23 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Lex wrote:
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?


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.
Jul 23 '05 #2

P: n/a
Lex wrote:
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


<a href="#" onclick="window.reload();return 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 <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq

Jul 23 '05 #3

P: n/a
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.

Jul 23 '05 #4

P: n/a
Grant Wagner wrote:
Lex wrote:
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


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

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


No it won't. Of course I meant:

<a href="#" onclick="window.location.reload();return
false;">Reload</a>
or
<a href="#" onclick="window.location.reload(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 <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq

Jul 23 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.