Make each tab a link with an href that loads the entire page with that tab selected. The onclick event handler can still load the pages via ajax for human viewers.
I would also go ahead and make that tab the "active" one.
I have a webpage that implements a set of tabs each showing different content.
The tab clicks do not refresh the page but hide/unhide contents at the client side.
You would need to have server side processing to parse the url and set the initial page title when the browser renders the page.
One thing you can be sure of, though, is that it will annoy other developers if they see to go with is the latter method.
This property is provided in the DOM Specification specifically for the purpose of, as the name suggests, changing the title.
So make sure the page reload works first then add document.title changes I just want to add something here: changing the title via Java Script is actually useful if you're updating a database via AJAX, so then the title changes without you having to refresh the page.
The title actually changes via your server side scripting language, but having it change via Java Script is just a usability and UI thing that makes the user experience more enjoyable and fluid.