A client wanted to change the title of a SharePoint 2013 site: the Search Center. Changing the site name or the results.aspx page wouldn’t do the trick.
Using the F12 function in IE I quickly found out that the title shown on a page is just a span element:
<span id="DeltaPlaceHolderPageTitleInTitleArea">Site Title</span>
document.getElementById("DeltaPlaceHolderPageTitleInTitleArea").innerHTML="New Site Title";
WARNING: this will not change the title itself, just the title shown on the page!