Hacker News new | past | comments | ask | show | jobs | submit login
Chrome extension to indicate background network activity per tab (github.com/awalgarg)
149 points by dwc on July 9, 2016 | hide | past | favorite | 40 comments



nice idea. I would prefer if it reset to 0 on page load though. I used it for a few minutes and after a few pages the count was already in the hundreds, at which point I've lost my sense of whether the count was increasing for this current page or if it was already high from previous pages


FWIW, this works fine in Firefox as well -- I used https://addons.mozilla.org/en-US/firefox/addon/chrome-store-... for the first time today, and it works great on the extension published on the Chrome store.


Must've missed where I could use Chrome extensions on FF - thanks!


This looks really interesting, is there a reason why it hasn't been uploaded to the Chrome Store? It would be much easier to install and keep updated.


EDIT: Published! https://chrome.google.com/webstore/detail/netmonitor/jekcpje...

(under my account by AwalGarg's request [0])

The Chrome store requires a flat fee to upgrade one's account to "uploader", which helps keep (some) spam out. AwalGarg (the fellow who built this) is a friend of mine and comes from a traditionally poor part of the world. I've contacted him about paying for the fee to see if we can get this on the Chrome Store proper.

[0] http://chat.stackoverflow.com/transcript/message/31616167#31...


You are awesome :-) thank you so much for doing that for both the developer, and the rest of us!

If the fee is to stop spam, it would be great if Google would consider upgrading the accounts of folks like AwalGarg for free.

Speaking of extensions, and I know this is off-topic, but I found an extension written by a Google team that implements OpenPG facilities for Gmail, but though it looks pretty complete they still say it's incomplete. What would we need to do to get them to finish this? I work for a large company that extensively uses Google for Business, in particular Gmail, and whilst Google has end-to-end encryption and facilities like Google Drive and Google Docs, I'd still like to be able to easily sign and encrypt my email!


Author here.

I think it involves some payment (IIRC) or some other stupid barrier. If someone is kind enough to take care of that for me, I'd be happy to publish it. I have a couple other extensions which I'd like to publish as well but wasn't able to do so in the past, so I have just stopped trying.


I didn't know that, thank you for clarifying, I would be glad to pay for the fee for you, you may contact me using my twitter username @gmail.com


No worries! Thank you for offering to pay the fee! Randall has humbly taken care of it this time though :) (Thanks RKoutnik!)


Whoa - when I browsed to the GitHub project I was expecting to see something I needed to compile, but this is all in JavaScript!

Which shows how little I know about Chrome extension writing. Where did you learn how to write extensions Awal?

Oh, and let me express my appreciation for you taking the time to write this and put it on GitHub :-)


Didn't "learn" it - I just google my way through! :P The docs are pretty good in general. But I guess knowing JS well is important, which I think I do. It is an easy language (leave for the ecosystem...) so you can surely get started quickly :)

I am glad you find my work useful, thank you!


Go check SO chat or read my sibling message, lemme send you that so we can get this up proper.


Yes.

Mini-tuto to install by hand:

1. Download zip - https://github.com/awalGarg/netmonitor/archive/master.zip

2. Unzip it

3. Go to chrome extension page (or type `chrome://chrome/extensions/` in the URL bar)

4. Drag and drop the folder `netmonitor` on the page


`chrome:extensions` works too :)


For curiosity I turned off the ad blocker and head over to the Huffington Post. Every mouse click triggers an XHR event and there is constant communication on top of that. It reached over 1000 requests after 3 quick page views.


Something nice would be to see, next to the tab title, the CPU resource taken by that tab. I don't mind pages loading a lot of resources, I mind pages killing my CPU.


You can use Shift+Escape for that


Shift+Escape made me realize HTTPS Everywhere[0] is by far my most resource intensive extension. Most extensions sit around the 20MB range (of memory usage). uBlock is in the 50MB range. HTTPS Everywhere is in the 100MB range and goes to 150MB sometimes. I love the extension but I do wonder how it manages to use so much memory...

[0] https://www.eff.org/https-everywhere


They load the entire rule dataset into memory.

https://github.com/EFForg/https-everywhere/issues/1775


Shift + Esc doesn't seem work for me (Chrome 53 dev), and there are a few open bugs about the shortcut not working. Opening Task Manager from the menus works fine though :)


Yeah I often fail to open the TM in Chrome/OSX.

This should be trivial to catch with CI tests...wonder what went wrong there.


That's true, for some reason the shortcut does not always work for me either on Windows and on OS X.


doesn't seem to work for Firefox :/


(Un)Fortunately, that, along with a couple other things were removed from chrome 51. See https://bugs.chromium.org/p/chromium/issues/detail?id=588790


It has? I have Chrome version 51.0.2704.106 m (64-bit) and I do get the task manager with SHIFT+ESC, with numbers for each tab and GPU and for some extensions for CPU, network and memory.

What you link talks about chrome://memory, which was indeed removed, but the parent post only says

    > You can use Shift+Escape for that


Whoops, sorry, my bad. It seems the "Stats for nerds" link (and the page it linked to) accessible via the task manager was removed, not the task manager itself. Apologies for the misinformation!


I really like this, it's an excellent idea.

This might be quite useful for developers as well, just as a quick indicator instead of having the Developer Tools Network tab open all the time.

One thing that might be quite useful (though it would probably be beyond the scope of this project and perhaps hard to implement) would be the ability to block any further requests made by the tab. A sort of per-tab 'offline mode'. Perhaps as a context menu option when clicking on the icon.

Also, it would be very interesting to see statistics on which popular websites tend to do the most user-activity tracking, lazy loading etc. - but, in order to collect and collate these statistics your extension would itself have to send background requests to some central API. That'd be quite ironic...

Anyway, nice work!


How hard is it to hook into tab icon / label ? I'd love to see it blink when something is moving. Reminds me of the audio icon when audio is sent.


A few chrome extensions no Chrome should be without. uBlock and/or Ghostery, needs no introduction.

FlashControl disables flash and allows selective enabling on components, pages or domains. Quick Javascript Switcher let's you selectively disable JS on individual pages, handy sometimes for badly behaving pages. Tab Suspender suspends unused tabs, useful if you have dozens of open tabs not otherwise.


> A lot of web pages use background network requests for tracking user actions and sending data to remote servers, lazily loading heavy assets etc., and all that goes unnoticed by the user.

And there is nothing wrong with it.


There's also nothing wrong with wanting to know about it. So I applaud the creation of this extension.

Though he does go on to say:

> Ideally, the browsers "loading icon" should spin for those requests as well

On that point, I don't agree, since it would give the misleading appearance—at least to me—that the page wasn't even done with its initial rendering. But perhaps he is suggesting the standard loading icon should switch to a sort of unobtrusive network in/out indicator after the initial rendering. That I would like.


Author here.

> perhaps he is suggesting the standard loading icon should switch to a sort of unobtrusive network in/out indicator after the initial rendering

yes, that was what I implied, which is why I wrapped "\"loading icon\"" in quotes :) I agree though that the wording isn't very clear, my bad!


That's the attitude which leads to users who don't know anything, can't easily learn, and can be easily controlled and manipulated. Of course, that might be your intention, in which case my only appropriate reaction is "DO NOT WANT!"


It depends. There are situations when a user is heavily constrained by both data and charge (Amp hr) limits. In those situations, heavy background loading is a measurable source of headaches and annoyance.


And there is nothing wrong with blocking these transfers either.

It is the user's own computer and the user's own network subscription after all. User pays for these resources.

As for the software, users get to choose the software. They might prefer software that does not use so much bandwidth. And there's nothing wrong with that.


My IPvFoo extension has a similar ability:

https://github.com/pmarks-net/ipvfoo

When viewing the popup window, each domain gets a yellow highlight if a connection is currently open. The feature was introduced in 2012:

https://github.com/pmarks-net/ipvfoo/commit/d09c68219cb970c1...


Is there any Firefox extension that provides comparable functionality?


You can install it directly via this addon: https://addons.mozilla.org/en-US/firefox/addon/chrome-store-...

yoasif_ has confirmed that it works. Firefox has implemented some but not all of chrome's webextension API, so this isn't guaranteed to work for all addons (yet).


The license (WTFPL – Do What the Fuck You Want to Public License) grabbed my attention. Seems to be even more permissive than MIT and BSD? At least the name suggests.


Unless something has changed in the past 3 years, it's not a good license. See DannyBee's comments about it:

https://news.ycombinator.com/item?id=5733050




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: