4 ms·
What do you use that good javascipt for? And what is the excessive stuff that causes slowness and bloat? I'm not a web programmer, just curious.
by starspangled 2y ago
What do you use that good javascipt for? And what is the excessive stuff that causes slowness and bloat? I'm not a web programmer, just curious.
- graemep 2y agoTwo examples that come up a lot for me: 1. filtering a drop down list by typing rather than scrolling through lots of options to pick one 2. Rearranging items with drag and drop The excessive stuff is requiring a whole lot of scripts and resources to load before you display a simple page of information.
- _heimdall 2y agoMy rule of thumb is to render HTML where the state actually lives. In a huge majority of cases I come across that is on the server. Some things really are client-side only though, think temporary state responding to user interactions. Either way I also try really hard to make sure the UI is at least functional without JS. There are times that isn't possible, but those are pretty rare in my experience.