<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Performance timeOrigin can be significantly in the past in Discussions</title>
    <link>https://connect.mozilla.org/t5/discussions/performance-timeorigin-can-be-significantly-in-the-past/m-p/55039#M19369</link>
    <description>&lt;P&gt;While building out some RUM observability code, I noticed that the `performance.timeOrigin` could be significantly in the past for some users. I don't know why or how this happens but I am wondering if it has anything to do with the browser preloading the page, or some other interaction with cache like bfcache. I have seen this issue in Firefox, Chrome, and Edge which leads me to believe my understanding of `performance.timeOrigin` is not right.&lt;/P&gt;&lt;P&gt;The assumption that I am currently working from is that `performance.timeOrigin` is the precise moment the page began loading (which the definition for is up for debate) while `performance.now()` is the milliseconds since that time. It's the latter part of that assumption that I really seem to have a problem with.&lt;/P&gt;&lt;P&gt;The data:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
  // Everything below is data from in-browser
  "Date.now": 1712869191634, // Browser time at time of execution
  "global.timeOrigin": 1712866335518, // Value of `performance.timeOrigin`
  "global.navigationStart": 1712869187273, // Value of `performance.timing.navigationStart`
  "localTimeDiff": -2851493, // `global.timeOrigin - global.navigationStart`
  "timeSincePageOrigin": 4361, // Value of `performance.now()`
  "originTime": 1712866335518, // Value of `window.performance.timeOrigin`
  "userAgentName": "Firefox",
  "userAgentOS": "Mac",
  "userAgentVersion": "124.0"
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the data, it appears the browser context was create ~47 minutes before navigation started. What am I misunderstanding here?&lt;/P&gt;</description>
    <pubDate>Thu, 11 Apr 2024 21:52:00 GMT</pubDate>
    <dc:creator>patrickhousley</dc:creator>
    <dc:date>2024-04-11T21:52:00Z</dc:date>
    <item>
      <title>Performance timeOrigin can be significantly in the past</title>
      <link>https://connect.mozilla.org/t5/discussions/performance-timeorigin-can-be-significantly-in-the-past/m-p/55039#M19369</link>
      <description>&lt;P&gt;While building out some RUM observability code, I noticed that the `performance.timeOrigin` could be significantly in the past for some users. I don't know why or how this happens but I am wondering if it has anything to do with the browser preloading the page, or some other interaction with cache like bfcache. I have seen this issue in Firefox, Chrome, and Edge which leads me to believe my understanding of `performance.timeOrigin` is not right.&lt;/P&gt;&lt;P&gt;The assumption that I am currently working from is that `performance.timeOrigin` is the precise moment the page began loading (which the definition for is up for debate) while `performance.now()` is the milliseconds since that time. It's the latter part of that assumption that I really seem to have a problem with.&lt;/P&gt;&lt;P&gt;The data:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
  // Everything below is data from in-browser
  "Date.now": 1712869191634, // Browser time at time of execution
  "global.timeOrigin": 1712866335518, // Value of `performance.timeOrigin`
  "global.navigationStart": 1712869187273, // Value of `performance.timing.navigationStart`
  "localTimeDiff": -2851493, // `global.timeOrigin - global.navigationStart`
  "timeSincePageOrigin": 4361, // Value of `performance.now()`
  "originTime": 1712866335518, // Value of `window.performance.timeOrigin`
  "userAgentName": "Firefox",
  "userAgentOS": "Mac",
  "userAgentVersion": "124.0"
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the data, it appears the browser context was create ~47 minutes before navigation started. What am I misunderstanding here?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2024 21:52:00 GMT</pubDate>
      <guid>https://connect.mozilla.org/t5/discussions/performance-timeorigin-can-be-significantly-in-the-past/m-p/55039#M19369</guid>
      <dc:creator>patrickhousley</dc:creator>
      <dc:date>2024-04-11T21:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: Performance timeOrigin can be significantly in the past</title>
      <link>https://connect.mozilla.org/t5/discussions/performance-timeorigin-can-be-significantly-in-the-past/m-p/55040#M19370</link>
      <description>&lt;P&gt;Personal note of possibly relevant links:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.mozilla.org/en-US/docs/Web/API/Performance/timeOrigin" target="_blank" rel="noopener"&gt;https://developer.mozilla.org/en-US/docs/Web/API/Performance/timeOrigin&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.mozilla.org/en-US/docs/Web/API/PerformanceTiming/navigationStart" target="_blank" rel="noopener"&gt;https://developer.mozilla.org/en-US/docs/Web/API/PerformanceTiming/navigationStart&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://bugzilla.mozilla.org/show_bug.cgi?id=1710762" target="_blank" rel="noopener"&gt;https://bugzilla.mozilla.org/show_bug.cgi?id=1710762&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://issues.chromium.org/issues?q=timeOrigin" target="_blank" rel="noopener"&gt;https://issues.chromium.org/issues?q=timeOrigin&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/getsentry/sentry-javascript/issues/2590" target="_blank"&gt;https://github.com/getsentry/sentry-javascript/issues/2590&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/newrelic/newrelic-browser-agent/pull/966" target="_blank"&gt;https://github.com/newrelic/newrelic-browser-agent/pull/966&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2024 22:20:03 GMT</pubDate>
      <guid>https://connect.mozilla.org/t5/discussions/performance-timeorigin-can-be-significantly-in-the-past/m-p/55040#M19370</guid>
      <dc:creator>patrickhousley</dc:creator>
      <dc:date>2024-04-11T22:20:03Z</dc:date>
    </item>
  </channel>
</rss>

