SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Oct 2011
    Location
    pune,India
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to reload page using javascript?

    Many times i need to reload page in my website.
    please help me get it done.

  2. #2
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,506
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    http://lmgtfy.com/?q=javascript+reload+page

    Google for it, there are lots of tutorials. And if you don't understand something specific, don't hesitate to ask.

  3. #3
    SitePoint Member
    Join Date
    Oct 2011
    Location
    Baltimore, Maryland
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    there are so many types of reloads like rload on click , reload on page, reload on timeouts, which one are you looking??

  4. #4
    SitePoint Member
    Join Date
    Oct 2011
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Any of those :

    window.location.reload();
    history.go(0);
    window.location.href=window.location.href;

  5. #5
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,862
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    If you want to force a reload from the server then use location.reload(true);
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •