Hi,
I am trying to reload the previous page after saving an edit form. After clicking on Save, I have used window.history.back(); but it only navigates to the previous page, I require it to reload as well. Is there a way to do this?
#LWC #LWC Component #Custom LWC #LWC Development #LWC Components
Hii,
To navigate back and reload the previous page, the most straightforward solution is to use window.history.back() followed by a short delay and window.location.reload().
The implementation may look something like this :
window.history.back();
setTimeout(function() {
window.location.reload();
}, 500);