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

118
Visualizações
How do I automate loading all of a browser page that is dynamically loaded?

I am trying to automate paging to the true bottom of a web page which is dynamically loaded; that is, a page which takes multiple page-downs or Ctrl-Ends to get to the real bottom (e.g., Netflix). I've got the basics done:

var timerID = setInterval(scrollDown,1000); 
function scrollDown() { 
  window.scrollTo(0, document.body.scrollHeight); 
  if ((window.innerHeight + window.scrollY) >= document.body.scrollHeight)  { 
    clearInterval(timerID); 
    alert("End of Page");
  }
}

(I compact all of the above onto one line preceded by "javascript:" and make it a bookmark.) There have been numerous suggestions here on the correct comparison for the "if" statement, but as far as I know, none of them take into account dynamic loading. My thought was to capture the current bottom line number or location and compare it in the "if" statement to the immediately previous value, and if they are the same, assume you really are at the bottom. I don't know how to capture the current bottom line info, but I would also be open to alternative approaches. Thank you.

Fred

about 4 years ago · Juan Pablo Isaza
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