Why not browser developers to inject popular js libraries, frameworks ?, so as not to download from somewhere, just call like any object or javascript method, there will be fewer requests for a server, or any problems? If you need a newer version for the example of the same angular, then you can simply download.

Google CDN - I know, it's still a request, once

  • one
    It's time for you to get acquainted with Google CDN - andreyqin
  • @Fikret: And who will determine which library is popular? Who will choose to include for all a stable version or edge? How to avoid dll hell: the site works with the old version, but not with the new version? - VladD
  • @Fikret, the idea is certainly tempting, but contrary to the principle of disconnection. The browser provides an interface, libraries use it. There should not be any relationship between the browser and the library, otherwise it will sooner or later turn into compatibility problems (and even now browsers behave not at all in the same way). - etki
  • Deadly injection. Nafigachili zoo browsers and no normal. - nitrocaster

1 answer 1

The idea is bad: here, firstly, the average Internet user, it turns out, will download a copy of each of the popular libraries to itself, without missing a single update, even if it never takes advantage of it.

While with popular CDNs from Google, Yandex, Cloudflare and the producers of these libraries, only the really needed library is downloaded when it is needed. And, importantly, it remains in the cache only of the browser where it is used.

Secondly, not every website / page developer will provide a copy of the necessary library built into the browser, as a priority option, which allows you to download it from the CDN.

In total, you will benefit from your proposal: saving time when loading pages containing popular libraries and providing a “new” feature of browsers. For example, jQuery with Google CDN I now loaded in 70ms - they would be saved.

Lose : extra traffic when updating the browser.

Those. there we win milliseconds, we lose there. Whether the game is worth the candle depends on the overall picture of use. Theoretically, a situation is possible when the win exceeds the costs. But definitely not 10 times or more (my assessment on the eye). Therefore, I - against.

  • one
    Why is it a bad thing right away? Just imagine - all popular sites are built right into the browser. Those. even in the absence of the Internet, you can always open a website - some mobile phones will save money on the Internet) And if browsers predict, what the site will look like tomorrow, then finally it will be good) The customer came, he said - I need it, this and that. You open the site in the browser - there is already all this, you save where necessary - and give it to the customer) Beauty is the same)) - BOPOH
  • why not to talk straight - Fikret
  • @Fikret, well, I just developed your idea. How is the library different from the site? In fact, only the backend and all. So why not move your thought to a more general task? I did it) - BOPOH
  • 2
    > Is the game worth the candle Why not a candle? - nitrocaster