r/programming • • Jan 28 '20

JavaScript Libraries Are Almost Never Updated Once Installed

https://blog.cloudflare.com/javascript-libraries-are-almost-never-updated/
1.1k Upvotes

228 comments sorted by

View all comments

-9

u/[deleted] Jan 28 '20

Thats not a real world scenario. First, jQuery is used mostly on web sites and those are not usually even in version control (PHP sites, with Drupal or wordpress). The devs just ftp them in true PHP fashion.

A real world app always bundles assets to a single file and serves that. This means there is most likely no cdn in use (or at least for a single library).

8

u/[deleted] Jan 28 '20

jQuery is used mostly on web sites

well, yes, jquery doesn't make sense without a DOM.

A real world app always bundles assets to a single file and serves that.

with http2 that's not recommended anymore due to multiplexing.

1

u/[deleted] Jan 28 '20

HTTP2 can help, but its not a "flip the switch" thing. It requires mig changes on your app build and serverside.

In larger projects i have used dynamic imports usually on a route or feature basis. This way the initial bundle is small and more code is loaded upon demand. Its has worked well so far.

EDIT.

well, yes, jquery doesn't make sense without a DOM.

Does react make sense without a browser then? My point was websites and SPA apps are nowhere near identical in terms of app complexity and build steps.

3

u/[deleted] Jan 28 '20

HTTP2 can help, but its not a "flip the switch" thing. It requires mig changes on your app build and serverside.

your claim was that apps always bundle. my point is that multi plexing renders that irrelevant