I understand where you're coming from, but for modern Internet speeds 30kb is nothing. Sure, it's worth taking into account if you're launching a site for a territory which suffers from slow Internet speeds, but for most affluent countries I'd argue 30kb is not worth losing sleep over.
You have to consider mobile networks as well, which can be very fast, but if you're far enough of phone antennas or isolated (maybe on an old house, or a subway station or whatever), then those 30k are a lot just to achieve the same thing you'll get from using fetch. Ideally we should always avoid downloading unnecessary JS. Just take a look at the trends that Remix or Astro are imposing, where JS is loaded only if needed, if not we just use HTML+CSS and that's ok.
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.
Helper functions can also be a thing.
I understand where you're coming from, but for modern Internet speeds 30kb is nothing. Sure, it's worth taking into account if you're launching a site for a territory which suffers from slow Internet speeds, but for most affluent countries I'd argue 30kb is not worth losing sleep over.
In the UK the average Internet speed in 2015 was 13 MBps. https://www.mindgems.com/info/file-download-time-calculator/?FileSize=30&Units=kilobytes It really takes no time at all to download such a tiny file.
You have to consider mobile networks as well, which can be very fast, but if you're far enough of phone antennas or isolated (maybe on an old house, or a subway station or whatever), then those 30k are a lot just to achieve the same thing you'll get from using
fetch
. Ideally we should always avoid downloading unnecessary JS. Just take a look at the trends that Remix or Astro are imposing, where JS is loaded only if needed, if not we just use HTML+CSS and that's ok.