Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

117
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!