Firstly, avoid leaking memory (including objects like images and DOM nodes) in JavaScript. Leaking memory here means retaining a reference beyond the end of the object's use. The garbage collector only collects memory which is no longer referenced; it does not attempt to analyse when a reference is no longer used.
Secondly, avoid including unnecessary resources. Many web pages include many libraries which are then mostly unused. Some packaging tools can help eliminate such unused code.
A memory profiler helps in both cases: it detects leaks, and it measures the cost of resources, allowing you to make educated decisions about their inclusion.
I think the main reason Microsoft has become more Linux friendly is that it is crucial to the success of Azure, which has become a major part of Microsoft's business.
For a variety of reasons, many of them are in the unfortunate and short-sighted position of being married to Windows and Microsoft software. Rejecting the software outright, and adopting some alternative would likely present larger costs and disruption. That said, there are a few cases in which the calculus favours this, or FOSS ideology prevails.
Couldn't an NSL have been served to datacenter operators, along with the notification of the attack, and the organisation's management simply be unaware?
As is the nature of futurism.