disable-webassembly
disable-webassembly copied to clipboard
I have disabled Web Assembly in my Chrome, but nothing changed
Chrome Version 65.0.3325.181 (Official Build) (64-bit)
I then tried different WASM application, especially coinhive.com and other ads-crypto-miners: they all still work just fine.
I'm trying to protect myself without the need of using AdBlock for it. But Chrome is making it really hard.
This flag does not disable WebAssembly.
You need to run Chrome with --js-flags=--noexpose_wasm
command line flag.
Look for tutorials on altering Chrome shortcut for your OS.
In Windows you might also want to modify the chrome's command line in registry: HKEY_CLASSES_ROOT\ChromeHTML\shell\open\command HKEY_CLASSES_ROOT\http\shell\open\command HKEY_CLASSES_ROOT\https\shell\open\command And then uncheck the write permission on these keys so that the changes persist on next auto-update of Chrome.
Note, many/all miners run a fallback code in pure js.
This flag does not disable WebAssembly. You need to run Chrome with
--js-flags=--noexpose_wasm
command line flag.
acording to Chromium's code #1, #2,
both enable-asm-wasm
& enable-wasm
were not disabled but migrated to feature flag,
this means that to disable wasm in Chrome based browsers one should pass --disable-features=WebAssembly,AsmJsToWebAssembly
to the chrome execute as a command-line argument. I guess using --js-flags="..."
will work too but I haven't tried it..
I tried --disable-features=WebAssembly,AsmJsToWebAssembly
but it didn't work on Chrome 66 (macOS). --js-flags=--noexpose_wasm
does work consistently for me though.
On macOS, we need to start Chrome using the following command:
open /Applications/Google\ Chrome.app --args --js-flags=--noexpose_wasm
It should be noted that the Brave browser (Laptop edition) is build on Chromium and Webassembly can be disabled by the same method, using --js-flags=--noexpose_wasm
@tophf thanks for the updates on chrome, specifically the command-line arg and the registry advise. I've added the content to the projects readme and acknowledged your contribution.
I will give it another go, but I checked all of the above and even got a bug about this o the Mac OS X version of Chrome open and assigned: https://bugs.chromium.org/p/chromium/issues/detail?id=825845
If this is now working as expected, it means in the meantime they fixed it.
@stevespringett its good to know,
I'm having them both anyway
--disable-features="WebAssembly,AsmJsToWebAssembly,WebAssemblyStreaming" --js-flags="--noexpose-wasm"
.
..along with a chrome extension I've made that sets self.WebAssembly = undefined;
before the pages loads-up, effectively erasing the API from existence from the page and every iframe in-it (you can do the same with APIs such as WebSocket
, IndexedDB
, History
, etc...)
those arguments are already being added to chrome://version/
when switching the suitable flags in Chromium's chrome://flags/#enable-asm-webassembly
, so it might take a while until it will effect Google Chrome.
Ah, very good background information @eladkarako . Thank you. If you find that the flags make it into Google Chrome before I do, please ping this ticket and update it if you could.
Hello.
Version 91.0.4472.164 (Official Build) Arch Linux (64-bit)
I managed to turn off WebAssembly by disabling the following parameters in chrome://flags
:
-
#enable-webassembly-baseline
-
#enable-webassembly-lazy-compilation
-
#enable-webassembly-simd
-
#enable-webassembly-threads
-
#enable-webassembly-tiering
.
It seems that it is off now after launching this script from StackOverflow.
Option --js-flags=--noexpose_wasm
didn't work for some reason.