DEV Community

Discussion on: You're using too much JavaScript

Collapse
 
codingjlu profile image
codingjlu • Edited

Think of the last time you used JavaScript redundantly in your website—I can't. Unless your creating a very minimalistic blog, there's not many cases that one doesn't need JavaScript.
For one, JavaScript may cause the device to slow down. Yeah, but do you actually know someone who uses IE 4? I don't even know anyone that uses IE at all. Know anyone that uses Windows 98?? Well, I don't, and I don't really care about the ~0.01% (made-up stat) people that do. Just get a new device.
Secondly, you said that HTML and CSS are forgiving. Yes, in a non-error-throwing way. Imaging if you are coding something in JavaScript that simply doesn't work. How would you debug it? In a way, thrown errors is a way to help you write better, high quality, and working code. And as a good web developer, you should never make syntax errors in HTML and CSS, and for me, I'd rather have HTML and CSS throw errors to save me frustration sometimes; don't you think? Forgiving code isn't necessarily good code, nor helpful code. In your context, forgiving code is code that doesn't work, but doesn't directly let you know.

Collapse
 
igorfilippov3 profile image
Ihor Filippov

Check your website Chrome User Experience Metrics. A then you will really know how many of your users have slow loading speed. Numbers can be unpleasant, even considering that now it is almost 2022.

Collapse
 
codingjlu profile image
codingjlu

Unpleasant, maybe. Necessary? Yes!!

Thread Thread
 
igorfilippov3 profile image
Ihor Filippov

Sorry, if I harm somebody.