DEV Community

Ahmad Hidayatullah
Ahmad Hidayatullah

Posted on

Script to manipulate user history

Here i am trying to handle when user click back on browser

//prevent back button
history.pushState(null, null, location.href);
window.onpopstate = function () {
window.location.href = "{{ route('user.index') }}";
};

Top comments (0)