Suppose there is an extension for Google+, so when I’m visiting plus.google.com, it’s running, but what happens if I close Google+ tab? Is it still running and consume my computer resource?
PS: I ask this because I’m wondering that if this is the truth, I can write an extension that enable or disable other extensions according to the website that I’m visiting, so maybe my Chrome would be faster
It depends.
The author of a Chrome extension can tell Chrome that the extension should only be active on particular websites. However, no matter the website you are visiting, the extension will always be running. To observe this phenomenon for yourself, hit
Shift+Escto display the task manager. Note the extension processes. You can see by trial and error that if Chrome is running, all of your enabled [background] extensions are also running.The benefit of the Chrome extension developer specifying particular websites is that, even though the extension is always running, it will not receive event notifications for websites that don’t apply to it – basically, it will be sleeping. So the effect is appreciable.
For more information about Chrome extension configuration options, see the Chrome extension manifest documentation here.
Edit: Please see Serg’s answer re: modifying other extensions.