Just use jquery :
jQuery( document ).ready(function( $ ) {
//Use this inside your document ready jQuery
$(window).on('popstate', function() {
location.reload(true);
});
});
The above will work 100% when back or forward button has been clicked using ajax as well.
if it doesn't, there must be a misconfiguration in a different part of the script.
For example it might not reload if something like one of the example in the previous post is used window.history.pushState('', null, './');
so when you do use history.pushState();
make sure you use it properly.
Suggestion in most cases you will just need:
history.pushState(url, '', url);
No window.history... and make sure url is defined.
Hope that helps..