I'm using the following JavaScript to prevent user to go back after logout.
history.pushState(null, null, document.URL);
window.addEventListener('popstate', function() {
history.pushState(null, null, document.URL);
});
The above code is placed both in <head></head>
section and at the bottom of the page. But still users are able to go back. Any idea?