HTML Event DOMContentLoaded dan Load
- Categories:
- html
- javascript
Event DOMContentLoaded
dan load
merupakan html event penting wajib diketahui bagi front-end web developer.
DOMContentLoaded
merupakan event html yang dipanggil ketika dokumen HTML telah selesai load dan parsing tanpa menunggu stylesheets atau css, images, atau subframes selesai diproses.
Sedangkan event load
merupakan event yang terjadi ketika halaman web telah selesai loading. Sangat disarankan menggunakan event DOMContentLoaded
dibandingkan event load
ketika menjalankan javascript.
Hal ini dikarenakan dalam menjalankan javascript tidak diperlukan untuk menunggu resource seperti stylesheets dan images selesai diproses, cukup menunggu Document Object Model (DOM) selesai load dan selesai dilakukan parsing.
Referensi
- Tags:
- #html
- #javascript
Recent Posts
How to Defend Against Brute-Force and DoS Attacks with Fail2ban, Nginx limit_req, and iptables
In this tutorial, I’ll explain how to protect your public-facing Linux server and Nginx web server from common threats, including brute-force and DoS attacks.
Is Getting AWS Solutions Architect Associate Certification Worth It?
If you are a full-time Software Engineer, there's no strong need to pursue this certification.
DevSecOps
My Notes about DevSecOps
AWS Secrets Manager
Explanation about AWS Secrets Manager with example code.
Envelope Encryption
Envelope encryption is the practice of encrypting plaintext data with a data key, and then encrypting the data key under another key.