179

When I'm viewing the downloaded resources for a page in the Chrome web inspector, I also see the HTML/JS/CSS requested by certain extensions.

enter image description here

In the example above, indicator.html, indicator.js and indicator.css are actually part of the Readability Chrome extension, not part of my app.

This isn't too big a deal in this particular situation, but on a more complex page and with several extensions installed, it can get quite crowded in there!

I was wondering if there was a way to filter out any extension-related resources from this list (i.e. any requests using the chrome-extension:// protocol).

Does anyone know how I could achieve this?

Mark Bell
  • 28,985
  • 26
  • 118
  • 145
  • 3
    For anyone looking for an answer, please go to chrome bug tracker and let the chrome dev team know we need this: https://bugs.chromium.org/p/chromium/issues/detail?id=239401 – tkit Oct 05 '17 at 15:59
  • It is really crazy that this is not possible after 10 years. So annoying if you have multiple extensions. – Wilson Silva Sep 02 '23 at 02:25

6 Answers6

309

Not quite the solution I was after (I'd have preferred a global setting), but there is now a way to filter out requests from extensions, as mentioned by a commenter on the issue I originally opened.

In the network tab filter box, enter the string -scheme:chrome-extension (as shown below):

Dev tools filter input screenshot

This is case-sensitive, so make sure it's lowercase. Doing this will hide all resources which were requested by extensions.

Mark Bell
  • 28,985
  • 26
  • 118
  • 145
  • 4
    The correct syntax for this is "-scheme:chrome-extension". The "s" is lowercase. This is important because devtools is case-sensitive on this. – Josh Apr 10 '15 at 23:11
  • 1
    @elusive-platypus You're right, thanks! I'm sure it wasn't case-sensitive when I first tried it (copy/pasted from the original comment), so either the dev tools filter code has changed, or I've just been typing it in lowercase anyway all this time without realising... anyway, I've edited the answer now. – Mark Bell Apr 11 '15 at 05:22
  • Is there a way to add multiple values? For example, I tried `-scheme:data`, which hides base64 encoded images (e.g. added by Lastpass when you focus on inputs). How can I use both `-scheme:data` and `-scheme:chrome-extension`? – Tyler Collier Feb 26 '16 at 18:50
  • To answer my question: just use a space. e.g. `-scheme:chrome-extension -scheme:data`. What's nice is the hints from Chrome, so after you type `-scheme:`, it will show you choices. – Tyler Collier Feb 26 '16 at 18:53
  • 8
    Do you know a solution to make that filter as default behaviour? – Murat Çorlu Feb 01 '17 at 13:57
  • 6
    @MuratCorlu As far as I'm aware there is currently no way to make this the default behaviour (although as far as I'm concerned it should be). – Mark Bell Feb 01 '17 at 17:24
  • @MarkBell can you please update the string to "-scheme:chrome-extension " from "-scheme:chrome-extension :" by removing the extra space and colon – Sudharshan Apr 11 '17 at 08:30
  • @Sudharshan The colon is just there to indicate that you enter the string as shown in the example screenshot, not as part of the string itself. However, I can see how this might have been confusing; hopefully my latest edit makes this clearer. – Mark Bell Apr 11 '17 at 12:57
  • 12
    Simply `-f` seems to do the job too – Malitta N Apr 03 '18 at 12:20
  • 6
    @blackpla9ue any idea why -f works here? What is it actually doing? – coryvb123 Jul 18 '18 at 17:23
  • it works!, but awesome will be to have it in settings or behind some flag – vAhy_The Sep 10 '19 at 11:04
  • N.B. this does not fix the "bytes transferred" – mpen Apr 06 '20 at 00:24
  • It's not hiding extension requests made to a normal public URLs, e.g. to Google Fonts and such. – Slava Fomin II Aug 04 '20 at 14:06
  • 1
    `-f` does no magic. It's a just text filter that excludes the requests that contain the `f` keyword. It cannot filter out the extension resources if the extension resources don't contain the `f` keyword. – Kevin Yue Dec 01 '20 at 06:29
  • This doesn't filter out everything. For example, the injected JS from Pocket extension still remains: `chrome-extension://niloccemoadcdkdjlinkgdfekeahmflj/pages/injector/content.js` – thdoan Jun 12 '23 at 19:12
2

Solution 1: Just enter -is:service-worker-initiated in Network field

Solution 2: enter domain:example.com

enter image description here

... there is no built-in way to permanently disable specific network requests. However, you can install a browser extension like uBlock Origin or Adblock Plus to permanently block unwanted network requests like Google Ads. These extensions offer extensive filter lists that allow you to block specific scripts and advertisements.

dazzafact
  • 2,570
  • 3
  • 30
  • 49
  • 1
    `-f` does no magic. It's a just text filter that excludes the requests that contain the `f` keyword. It cannot filter out the extension resources if the extension resources don't contain the `f` keyword. And it also filters out the normal requests. – Kevin Yue Dec 01 '20 at 06:30
2

Was having the same question when my extension adds a lot of noise in the network tab.

Some extensions also fire a lot of data like data:text/image etc, you can append more filter with - like:

-scheme:chrome-extension -scheme:data

Another way to get the http/https requests is to just use scheme:https without - because the resources that extensions request are usually from their local bundle:

scheme:https

LeOn - Han Li
  • 9,388
  • 1
  • 65
  • 59
1

An Incognito Window, can be configured to include or exclude extensions from the extensions page of Chrome settings.

Ethan Selzer
  • 1,757
  • 15
  • 14
  • True, but I have a few extensions I actually need to use during development; plus, incognito windows won't remember any login details or autocomplete any form inputs, both of which are features I really need when testing web interfaces. You can stop any extension resources appearing easily enough by just creating a fresh user profile with no extensions installed (and you'll still have working autofill, unlike an incognito window). However, this still doesn't help if you have extensions you use during the dev process. – Mark Bell May 09 '13 at 13:26
  • @MarkBell I think once you session in with an incognito window, it will keep your session until you close it. Thank you for the original tip though, this is helpful! Upvote! – andrewmart.in Mar 17 '16 at 18:42
  • It is possible to allow extensions in Incognito, so this might not always work. – Jeremy Wilken Oct 11 '16 at 21:06
0

One alternative is to go to "Network Request blocking" tab and add "chrome-extension:" to the list, thus extension requests will be blocked and coloured red so it's easy to visually filter them out.

Georgy Petukhov
  • 103
  • 1
  • 2
  • 7
  • Is "Network Request blocking" a standard tab in Chrome's developer tools, or is it added by an extension? – Mr. Lance E Sloan Oct 10 '22 at 12:04
  • @Mr.LanceESloan it's standard, not added by extensions. it's in the same place where the "Console" tab is, that is in the bottom of the Dev Tools window. more info here https://learn.microsoft.com/en-us/microsoft-edge/devtools-guide-chromium/network-request-blocking/network-request-blocking-tool – Georgy Petukhov Oct 14 '22 at 11:18
-1

enter image description here

you can simply enable this option and requests from extension will be group.

Update: It can only group requests that create by the extension that draw iframe, such as cVim

Community
  • 1
  • 1
郭润民
  • 59
  • 3
  • Incorrect. This does not catch requests from a content script in the main frame. – Xan Oct 11 '17 at 10:05
  • @Xan You are right, but it would be a possible and simplest solution if an extension load script in iframe, just like the pic I post – 郭润民 Oct 12 '17 at 11:06