window.load

박진·2021년 2월 18일
0

DOMContentLoaded 는 오직 document (html)이 로드가 된후 로드가되는것,

load는 resources (css, images... )등이 로드가 된후 로드가 된다.

script에 defer를 쓰게되면 가장 먼저 로드가된다.

또한 document가 업로드가되기전에 업로드되느것이 있는데, beforeunload가있고

resource가 업로드되기전은 unload이다 차이점을 잘알고 사용해야겠다.

profile
Hello :)

0개의 댓글