mozilla / tofino

Project Tofino is a browser interaction experiment.
https://mozilla.github.io/tofino
Apache License 2.0
649 stars 67 forks source link

Investigate whether the page title is always updated in time before history is sent to the profile service #1270

Open darkwing opened 8 years ago

darkwing commented 8 years ago

I'm in love with myself so I visit my site often, thus I see the same stuff in history every few rows:

multipleoccurrences

Some consolidation logic would be really nice.

victorporof commented 8 years ago

I bet those are different urls. Can you confirm?

darkwing commented 8 years ago

Damn, you're right...but the <title> tags on each of those pages isn't "DWB - JavaScript Consultant", it's "Modernization of Reactivity" (incorrect), "DWB - JavaScript Consultant" (correct), and "JavaScript Bind Function" (incorrect)

darkwing commented 8 years ago

Oh, you know what? Maybe this is because I do AJAX page loads. Process goes like:

  1. Load site initially
  2. Click to other page on site:
  3. preventDefault and then do an XHR to get that URL's full content (no API or anything)
  4. Update the URL via History API, then parse out the contents of <title> and content DIV to place those items

I'm pulling some naive stuff so it's probably my fault.

darkwing commented 8 years ago

Feel free to close, I think this may just be the way I do things.

victorporof commented 8 years ago

Should investigate. It's possible that we're not updating the page title in time when navigations occur and history is added to the profile service.