jquery/jquery-mobile — Issue #2865: Page title overridden on first load
Author: toddparker
Created: 2011-10-27 16:17:22+00:00
State: open

If you either deep-link (or refresh) a page in the docs that has a heading bar, the framework is incorrectly overriding the page title with the contents of the heading tag in the header instead of just leaving the title alone. I think our dynamic title re-writing uses the data-title tag if it finds it, then falls back to the heading string so this means the title is being re-written on initial page load when it should really just be left alone if it's a single page document. We're just missing a bit of logic for this scenario.

This is reproducible on any page in the docs except the homepage because that doesn't have a header. Start on the homepage and navigate to any inner page and you'll see the title is correct when it's loaded in via Ajax (title = title of the page Ajax'd in). If you then refresh the page, the title will be replaced with the string inside the heading tag:
http://jquerymobile.com/test/

Seems like we're being a bit overzealous with our title re-writing.