2

I want to launch google-chrome-beta on linux for a local html file with JavaScript disabled for all pages. I have tried the mentioned -disable-javascript option and this does not work. Anybody have a solution for this?

My usecase is for offline documentation that I scraped which I want to have the JS disabled so it does not go awry once pages load.

2

on linux the parameters begin with 2 minuses

chrome --disable-javascript

UPDATE: this doesn't work with the latest chrome beta, sorry.

  • Have you tried this on chrome beta on linux? If so, what chrome beta version and which linux. Not working for me on Suse and chrome beta Version 52.0.2743.75 beta (64-bit). FYI, google chrome beta executable should be google-chrome-beta which is in /usr/bin on Suse. – Timothy C. Quinn Aug 16 '16 at 22:08
  • sorry, you're right! It's working with stable, but not with beta. I think google made some mistake. – Ipor Sircer Aug 16 '16 at 22:21
  • This is not a bug. The feature was removed from Chrome in the last year. – Timothy C. Quinn Aug 29 '16 at 17:33
1

Current versions of Chrome no longer support the --disable-javascript cli option. The argument is that there is now a way to do this in the GUI so it should not be needed in the CLI options.

It was discussed to be removed back in 2010 and was formally removed some time after. Here is the change which removed the option content_switches.cc

The work around options are to:

  1. Use another browser like Tor Browser which has no JS by default
  2. Create a second profile that has JS disabled:
    • This is a bit of a pain so I did not bother.
  • In Tor Browser 6.5.1 (based on Mozilla Firefox 45.8.0), Javascript is enabled, by default. – Dave Burton Sep 30 '17 at 6:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.