New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 752865 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 96041
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Page title not updating when refreshed

Reported by chihuahu...@gmail.com, Aug 7 2017

Issue description

Chrome Version       : 60.0.3112.90 (Official Build) (64-bit) (cohort: 60_90_win)
URLs (if applicable) :
Other browsers tested:
  Add OK or FAIL, along with the version, after other browsers where you
have tested this issue:
     Safari:
    Firefox: 54.0.1 (pass)
         IE:

What steps will reproduce the problem?

I encountered this bug while testing out the Wikipedia API. I was using JavaScript to change the document title to the title of the Wikipedia article. At some point, I removed this functionality, saved the code, and refreshed the page. A few minutes later, I noticed that the document title was still the title of the same Wikipedia page. This was strange, since I had removed the document.title line from the code. I looked around but nothing else in the code was setting the title, nor was there a title tag. I did some more testing and was able to make this minimal reproducible example that worked in a different tab:

<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script>
<script>
$.ajax({
url: 'https://en.wikipedia.org/w/api.php?action=query&format=json&list=random&rnlimit=1&rnnamespace=0',
type: 'GET',
crossDomain: true,
dataType: 'jsonp',
success: function(data, response)
{
document.title = "test";
}
})
</script>
</head>
</html>

The reproduction steps were to:

1. Load that page
2. Observe the document title
3. Remove the document.title line
4. Save the file
5. Refresh the page (by using Control-R or by clicking the refresh button; both worked)
6. Note that the title of the tab has not changed

Those were the reproduction steps, and they consistently worked at first. However, when I tried the bug again a few minutes later, just before submitting this bug report, these steps no longer worked. I tried a few things to make it work again but I had no luck.

Interestingly, despite the fact that my example no longer works in a fresh tab (but it did, I swear), the original tab is still affected. I can consistently reproduce this behavior in that one tab, but not in any others.

My guess is that this is related to the HTML not having a title tag. Perhaps Chrome sometimes fails to refresh the title of the page if there's no title tag?

Maybe it's some kind of intentional behavior so that, if a website sets its title with document.title instead of <title>, you'll continue to see the old title instead of briefly seeing "Untitled" when you refresh or go to a different page on the website. That's a complete shot in the dark, but I could see it being the case.
 
Labels: Needs-Triage-M60
Cc: krajshree@chromium.org
Components: UI>Browser>Navigation
Labels: Needs-Feedback
Unable to reproduce the issue on Win-10, mac 10.12.6 and Ubuntu 14.04 using chrome reported version #60.0.3112.90 and latest canary #62.0.3179.0.

Attached a screen cast for reference.

Following are the steps followed to reproduce the issue.
------------
1. Opened the html file as provided in comment #0 and the document title was "test".
2. Removed the document.title line
3. Saved the file
4. Refreshed the page (by using Control-R).
5. Observed that the title of the page changed.

chihuahuasare2cute@ - Could you please check this issue on latest canary #62.0.3179.0 by creating a new profile without any apps and extensions and please let us know if the issue still persist or not. Also please mention in which OS the issue was seen.

Thanks...!!
752865.mp4
1.3 MB View Download

Comment 3 by creis@chromium.org, Aug 8 2017

Cc: creis@chromium.org
Owner: a...@chromium.org
Avi, can you take a look?  For a moment I thought this was due to your https://chromium-review.googlesource.com/c/596152 (which intentionally removes the fix for  issue 96041  so we can land the better fix in https://chromium-review.googlesource.com/c/596069), but that CL hasn't landed yet.  Also, this report is from M60.

Comment 4 by a...@chromium.org, Aug 8 2017

I can't get this to repro no matter what I try. PlzNav or not, M60-62.


Comment 5 by a...@chromium.org, Sep 11 2017

Mergedinto: 96041
Status: Duplicate (was: Unconfirmed)
Closing in favor of 96041.

Sign in to add a comment