Skip to content

pushState title is ignored in all implementations? #2174

@foolip

Description

@foolip
Member
<title>title</title>
<button onclick="history.pushState({}, 'new title', 'other.html')">click me</button>

I tested this in Chrome, Edge, Firefox and Safari (Desktop) and none update the tab title.

https://html.spec.whatwg.org/#dom-history-replacestate says "The title is purely advisory. User agents might use the title in the user interface" but if it never does anything, some action is needed.

Is this a feature worth trying to save? If so we need to file bugs and see if we can make it happen. If not, then we should probably make this argument explicitly a dummy and recommend using document.title instead.

See also http://stackoverflow.com/questions/13955520/page-title-is-not-changed-by-history-pushstate

Activity

annevk

annevk commented on Dec 15, 2016

@annevk
Member

Do we know why it's not implemented?

domenic

domenic commented on Dec 15, 2016

@domenic
Member

I remember this being mentioned in a @Hixie interview from several years ago: http://html5doctor.com/interview-with-ian-hickson-html-editor/

Yay295

Yay295 commented on Dec 16, 2016

@Yay295
Contributor

Nice interview. After reading it, it looks like they decided that the second argument shouldn't be there, but they couldn't remove it because people had already started using it.

Would it be possible to give it a purpose now? I could see it being used to set the title of the page, but who knows what might show up if that were implemented, given people have been putting whatever in there for so long.

foolip

foolip commented on Jan 2, 2017

@foolip
MemberAuthor

Ah, I remember that interview too, but not that this was the API in question. It does seem pretty unlikely that using its value in the UI should give the desired results after many years of being ignored. Should we make it explicitly a dummy argument by renaming it, then?

zcorpan

zcorpan commented on Jan 2, 2017

@zcorpan
Member

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/4768

In Safari TP it is shown in the back/forward dropdowns.

jlebar

jlebar commented on Jan 2, 2017

@jlebar
zcorpan

zcorpan commented on Jan 5, 2017

@zcorpan
Member

@cdumez can you comment on Safari's behavior here? Was there a good reason for this behavior such that it would be a good idea for other browsers to adopt it, or should Safari align with Chromium and Gecko and ignore the argument?

@domenic what does Edge do?

domenic

domenic commented on Jan 5, 2017

@domenic
Member

Edge does not appear to use the title.

mgol

mgol commented on Aug 27, 2017

@mgol

@cdumez Could you weigh in? I had an impression every browser ignored the title, the WebKit bug was even wontfixed back in the days. It'd be good to restore cross-browser compatibility one way or the other.

cdumez

cdumez commented on Sep 1, 2017

@cdumez

@weinig @beidson are probably better people to answer this question. This seems like fairly old behavior.

Yay295

Yay295 commented on Jul 9, 2018

@Yay295
Contributor

Pinging @cdumez to see if we can get this moving again.

35 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    interopImplementations are not interoperable with each othertopic: history

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @jlebar@zcorpan@gijsk@foolip@domenic

      Issue actions

        pushState title is ignored in all implementations? · Issue #2174 · whatwg/html