Can I somehow turn off all user browser-extensions (or specific ones, for Firefox or any other browser) when user enters my page?
More specific, I'm creating new window with window.open and I want this window to have only address bar and nothing more, but some extensions, like firebug, adds their icon near the address bar.

- 3,617
- 5
- 32
- 56
1 Answers
No, you can't and you shouldn't can.
Users should do what they want with their browser
JavaScript isn't enough powerful to do that. Extensions are part of browser configuration, decided by the user. And browser makers aren't so fool to let untrusted javascript code to change the configuration of the browser, because anyone would use them.
And in case javascript could disable extensions, it couldn't disable them completely. For example, with greasemonkey extension you can run scripts at the beginning of any page. Then, page's scripts will execute after, so can't block greasemonkey scripts. Instead, greasemonkey scripts can block following scripts using beforescriptexecute
.
In short: javascript isn't trusted code, so it isn't powerful. But extensions are trusted code (user trusts them when he installs them), so they are more powerful than javascript. Then, with javascript you can't disable extensions, but extensions can disable javascript.

- 274,082
- 63
- 437
- 513
-
Right, right, thx for your answer. But anyway maybe some ideas, or it's absolutely impossible? Let's say changes that this extensions can make in browser windw can harm my page's functionality – Max Yari Aug 03 '13 at 17:55
-
maybe just hide their appearance in new window, not turn off totally – Max Yari Aug 03 '13 at 18:11
-
@SinnerSmile If you just want to hide toolbars, you could try https://developer.mozilla.org/en-US/docs/Web/API/window.open#Toolbar_and_chrome_features . But you will be able to do it only if users' configuration allow you to do so – Oriol Aug 03 '13 at 18:14
-
Well, I allready can hide toolbars, can hida everything but not address bar (don't need to hide it truly) and extensions that throw their icons near address bar (like firebug in firefox) – Max Yari Aug 03 '13 at 18:37