Modifying the title of a tab or window is an older practice. Gmail uses it to prompt users for new chat messages. When a new page is loaded through AJAX, this site also uses it to update the tab title. How did this be done? At that time, it was set by setting the document object.
The code copy is as follows:
document.title = 'Hello!'; // New title :)
There is a common sense mistake: you think you should modify window.title. But in reality, you should use the document object, otherwise what you do is definitely useless. Note, you will see: often setInterval is used to actually update document.title to attract users' attention!