I have been creating a couple of webpages using three.js recently. When I inspect what’s being downloaded in Chrome I see a file named installHook.js. I have searched here on SO and other corners of the internet but can’t find out what it is (possibly it is linked to React but I don’t use that). Does anyone know what it is and if I can somehow remove it as it is the largest resource being downloaded?
If I follow the link I get to this file
Strange thing is that I see this both for sites using web pack and sites who don´t.
2
Answers
In my case, installHook.js comes from the React Dev Tools Chrome extension. You don’t need to worry about this as it does not affect the performance of the application for end users.
Screenshot: some code of the installHook.js
The accepted answer is great, but I wanted to add more detail in case your browser is loading other files you don’t recognize, from extensions other than "React Dev Tools".
In the network tab (OP posted a screenshot) you can click on the request to see the details of the request.
Note the URL specifically uses a
chrome-extension
protocol, that’s our hint that it’s a Chrome extension:chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/installHook.js
Note the identifier from the previous URL: "fmkadmapgofadopljbjfkapdkoienihi". How can you know which Chrome extension the identifier refers to?
Copy the identifier to your clipboard. Visit
chrome://extensions/
in your Chrome browser, and paste the identifier into the search input at the top of the page. You’ll notice the search results are filtered to show you which extension is loading that file.You can disable the extension by toggling its slider, or remove the extension by clicking the "Remove" button.
If you click the "Detail" button on a particular extension in the
chrome://extensions
window, Chrome should load a specific details page reiterating the identifier. In this case, Chrome loads the URL:chrome://extensions/?id=fmkadmapgofadopljbjfkapdkoienihi
… notice the identifier "fmkadmapgofadopljbjfkapdkoienihi" appears again.
Note other ways to disable extensions, like running Chrome with extensions disabled with
--disable-extensions
or--incognito
flag