Bug 1756970 Comment 34 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

I was debugging this a bit, since I happened to notice this.  First I wondered if there was something wrong with session history, but everything looked fine there and history.state is updated correctly.  Then I noticed there is a timestamp attached to the state. I assumed it is coming from performance.now(). 
Whenever two consecutive session history entries had history.state.entryTime set to same value, back button didn't seem to work.
Then I tried to make that happen less likely by always returning unclamped value in https://searchfox.org/mozilla-central/rev/2fc2ccf960c2f7c419262ac7215715c5235948db/dom/performance/Performance.cpp#129-130,137 and that seemed to help quite a bit (well, always in my testing). Chrome seems to more often return also decimal values.

tjr, could we possibly tweak performance.now() behavior?


But if my debugging is correct and youtube really relies on performance.now() in that way, it does feel like an site issue.
Ksenia, could we perhaps contact Youtube about this issue (if we haven't done it already)
I was debugging this a bit, since I happened to notice this.  First I wondered if there was something wrong with session history, but everything looked fine there and history.state is updated correctly.  Then I noticed there is a timestamp attached to the state. I assumed it is coming from performance.now(). 
Whenever two consecutive session history entries had history.state.entryTime set to same value, back button didn't seem to work.
Then I tried to make that happen less likely by always returning unclamped value in https://searchfox.org/mozilla-central/rev/2fc2ccf960c2f7c419262ac7215715c5235948db/dom/performance/Performance.cpp#129-130,137 and that seemed to help quite a bit (well, always in my testing). Chrome seems to more often return also decimal values.

tjr, could we possibly tweak performance.now() behavior?


But if my debugging is correct and youtube really relies on performance.now() in that way, it does feel like an site issue.
Ksenia, could we perhaps contact Youtube about this issue (if we haven't done it already)

MDN does document quite well that the accuracy of performance.now() may vary https://developer.mozilla.org/en-US/docs/Web/API/Performance/now#reduced_time_precision
I was debugging this a bit, since I happened to notice this.  First I wondered if there was something wrong with session history, but everything looked fine there and history.state is updated correctly.  Then I noticed there is a timestamp attached to the state. I assumed it is coming from performance.now(). 
Whenever two consecutive session history entries had history.state.entryTime set to same value, back button didn't seem to work.
Then I tried to make that happen less likely by always returning unclamped value in https://searchfox.org/mozilla-central/rev/2fc2ccf960c2f7c419262ac7215715c5235948db/dom/performance/Performance.cpp#129-130,137 and that seemed to help quite a bit (well, always in my testing). Chrome seems to more often return also decimal values.

tjr, could we possibly tweak performance.now() behavior?


But if my debugging is correct and youtube really relies on performance.now() in that way, it does feel like an site issue.
Ksenia, could we perhaps contact Youtube about this issue (if we haven't done it already)

MDN does document quite well that the accuracy of performance.now() may vary https://developer.mozilla.org/en-US/docs/Web/API/Performance/now#reduced_time_precision
And looks like setting privacy.reduceTimerPrecision to false in about:config changes the behavior for me.

Back to Bug 1756970 Comment 34