Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

197
Visualizações
How to get the timestamp of the DOM loaded?

The obvious answer was using performance.timing, as described here, but it is deprecated.

The new interface seems to give only durations, but I can not see any reference of timestamp.

Example (from here):

performance.getEntriesByType('navigation').forEach((navigation) => 
{
  console.dir(navigation);
});

gives

{
    "name": "https://developer.mozilla.org/en-US/docs/Web/Performance/Navigation_and_resource_timings",
    "entryType": "navigation",
    "startTime": 0,
    "duration": 381.90000009536743,
    "initiatorType": "navigation",
    "nextHopProtocol": "h2",
    "workerStart": 0,
    "redirectStart": 0,
    "redirectEnd": 0,
    "fetchStart": 9,
    "domainLookupStart": 9,
    "domainLookupEnd": 9,
    "connectStart": 9,
    "connectEnd": 9,
    "secureConnectionStart": 9,
    "requestStart": 15.400000095367432,
    "responseStart": 49.40000009536743,
    "responseEnd": 52,
    "transferSize": 16819,
    "encodedBodySize": 16519,
    "decodedBodySize": 104257,
    "serverTiming": [],
    "workerTiming": [],
    "unloadEventStart": 0,
    "unloadEventEnd": 0,
    "domInteractive": 271.90000009536743,
    "domContentLoadedEventStart": 324.2000000476837,
    "domContentLoadedEventEnd": 324.2000000476837,
    "domComplete": 381.7000000476837,
    "loadEventStart": 381.90000009536743,
    "loadEventEnd": 381.90000009536743,
    "type": "navigate",
    "redirectCount": 0
}

Besides the documentation or implementation is way more complex. How do we get now the timestamp of the page loaded (or of startTime) ?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

I found the answer, not by google (which gives all answers based on performance.timing), but looking all the values of performance object.

I found this:

Performance.timeOrigin

Described here

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda