reload()
The reload()
function enables you to reload the page. The difference with window.location.reload
is that reload()
is much faster as it uses Vike's Client Router.
reload()
works only with Client Routing. If you use Server Routing, then dowindow.location.reload()
instead.
The most common use case for reload()
is to refresh the page when an authentication cookie is updated, see Tool Integration > Authentication.
It's the same as navigate(window.location.href)
but it handles some edge cases.