News for hackers. Stuff that matters.
Re:Cash: An absurdly small jQuery alternative for modern bro... by niutech on Friday November 15, 2024 @04:04AM (#42145129)
Importing an ES module without a bundler involves making a HTTP request, which costs time.

Better KISS and fit all of JS in a single script.

Re:Cash: An absurdly small jQuery alternative for modern bro... by mg on Friday November 15, 2024 @05:23AM (#42145551)

    which costs time
No sure this holds true anymore.

When you go to a site like reddit.com which uses HTTP/2, you see a gazillion of requests for JS files, many starting at the same time and ending at the same time.

I think that is because newer HTTP versions can put multiple requests in the same data packet. And even HTTP/3 is now supported by over 90% of browsers.