You're always delivering dead code to some extent. Most users won't use every single feature of your site, so part of that code will be unused. Just see how big of a difference it makes in the size of your JavaScript, and if it's a big difference, load the JavaScript that's needed for this feature asynchronously. Most JavaScript build tools, like webpack, have functionality for code splitting built-in.
I kind of hear you. Yesterdayβs code is already dead code. But I do think that having metrics (like what I shared in my most recent article) help to avoid this problem you identified:
Most users wonβt use every single feature of your site
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You're always delivering dead code to some extent. Most users won't use every single feature of your site, so part of that code will be unused. Just see how big of a difference it makes in the size of your JavaScript, and if it's a big difference, load the JavaScript that's needed for this feature asynchronously. Most JavaScript build tools, like webpack, have functionality for code splitting built-in.
I kind of hear you. Yesterdayβs code is already dead code. But I do think that having metrics (like what I shared in my most recent article) help to avoid this problem you identified: