Reload page using JavaScript

Published on August 31st, 2019

javascript icon

Hey, if you have option of refreshing something without reloading whole page I will strongly advise you to do it that way. However, if you really have to reload page here is how you do it.

window.location.reload()

Note that this will reload page from cache if it can. If you need to pull new data or something from server then you have to pass true to reload function.

window.location.reload(true)