Search code examples
javascriptbrowser-refresh

how can refresh a page remotly in javascript


is there a way to refresh a page remotly from another page in javascript. i want to force the browser to do a refresh when i go back to a page which was displayed before. im doing some code in a page and it should show some results in another page, when i go to the page where i suppose to see the results, i have to press F5 to see them... so please help :))


Solution

  • I think you are looking for location.reload(true) (reloads from the server) or location.reload() (reloads from cache)

    <a href="link_here" onclick="location.reload(true)">click me</a>
    

    Hope this helps.