I am working on localhost/mysite/users
. On this page there is user listing and the records are coming from ajax request.
I am facing a strange issue, whenever I press back button and then forward button; on page localhost/mysite/users
only the ajax listing is shown, all the page design and other elements are deleted.
Can you please let me know the reason and suggest some solution?
$(document).ready(function() {
// on page load get listing from this page
sendReq('localhost/mysite/users');
});
On users page:
if (isset($_SERVER['HTTP_X_REQUESTED_WITH'])
// get users
} else {
// page rendered
}