Replaced network.onRequestFinished() caching with network.getHAR() (#22285)
Replaced network.onRequestFinished() caching with network.getHAR() (#22285)

Replaced network.onRequestFinished() caching with network.getHAR() so that we can avoid redundantly (pre) caching JavaScript content. In the event that the HAR log doesn't contain a match, we'll fall back to fetching from the Network (and hoping for a cache hit from that layer).

I've tested both internally (internal Facebook DEV server) and externally (Code Sandbox) and it seems like this approach results in cache hits, so long as DevTools is opened when the page loads. (Otherwise it falls back to fetch().)
facebook/react,camsong/react,facebook/react,camsong/react,facebook/react,yungsters/react,facebook/react,yungsters/react,yungsters/react,facebook/react,camsong/react,yungsters/react,facebook/react,camsong/react,yungsters/react,camsong/react,yungsters/react,yungsters/react,camsong/react,camsong/react,facebook/react