Hacker News new | ask | show | jobs
by bentlegen 5166 days ago
The onload event fires after the page has fully loaded - all scripts, image files, etc. I would say that it is more effective than your snippet for waiting until "essential work" has been finished.