Open sonnety opened 8 years ago
Can you explain in more detail that you do not like? And also specify which browser, version, etc.
Thanks!
Hello i'm using chrome 51+ . And the problem is on back button with title change not working i mean see the example :
$(function() {
var location = window.history.location || window.location;
$(document).on('click', '#ajaxlink a', function(e) {
var $this = this.href;
history.pushState(null,null,$this);
e.preventDefault();
return false;
});
$(window).on('popstate', function(event) {
document.title = $('#gettitle').text();
});
});
All working fine but when i'm in page1 and the page title is title1 and when i click page2 and page two title is title2 so all working fine and pushState change the title properly. But the problem is in back button and i think in popstate event because when i'm in page two and when i back to page1 then the title not changing to title1, i mean title2 > title1 . I think u understand.
I follow this
But the Titles are not change when click browser back button.