0

Possible Duplicate:
how to refresh a page using javascript?

how to reload (refresh) the web-page through java script only once not repeatedly. I want to refresh the page once at a time.

4
  • 3
    That's a very good question for Google. Commented Sep 28, 2011 at 10:55
  • please guys read the question carefully and concentrate on "once and not repeatedly" word. ok? Commented Sep 28, 2011 at 11:18
  • Then check this: stackoverflow.com/questions/6160415/… Commented Sep 28, 2011 at 11:20
  • It looks like nobody read the "once" - if you want that, use if(location.search !== "?norefresh") location.href += "?norefresh". Commented Sep 28, 2011 at 11:20

5 Answers 5

2

If you want to refresh (reload) the page you can use location.reload(true).
This link may help you to explore it further more Javascript Refresh Page

Sign up to request clarification or add additional context in comments.

Comments

1

using history.go(0) refreshes the current page

2 Comments

this is not useful in my case it will refreshing every 1 seconds. I need only once.
It will refresh only once. If your page refreshes multiple times, the cause must be elsewhere in your code. Review your question and give us some example code, i'd say.
0

location.reload( true );

The parameter tells the browser, to always reload the current page from the server. If that is skipped or explicitly set to false, the browser may load the page from its cache.

Comments

0

Options :-

window.location.reload()
window.location.href=window.location.href

Comments

0

It will help you

window.location.reload(true);

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.