Be the first user to complete this post

  • 0
Add to List

window.onload vs document.onload


  • It is fired when the entire page loads, including its content (images, css, scripts, etc.)
  • $(window).load()


  • It is fired when the DOM is ready which can be prior to images and other external content is loaded
  • In general, document.onload event is fired before the window.onload
  • $(document).ready()
Watch the following video to understand this concept with a practical example in detailed!

Also Read:

  1. box-sizing
  2. The JavaScript Prototype Property - Visualized
  3. Getting started with localStorage vs sessionStorage in html5
  4. Array filterUntil function implementation for javascript
  5. nodejs: generate uuid / guid
  6. Progressive enhancement vs Graceful degradation
  7. Two column layout in css
  8. Getting started with es6 iterators and iterables