Unable to disable javascript on linux via command line
Reported by
tim.c.qu...@gmail.com,
Aug 16 2016
|
||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.75 Safari/537.36 Steps to reproduce the problem: 1. Launch chrome using % google-chrome-beta --disable-javascript <url> 2. Javascript is still enabled for <url> loaded 3. What is the expected behavior? JavaScript should be disabled for loaded web page in the same way that chrome stable operates. What went wrong? JavaScript is still enabled. Did this work before? N/A Chrome version: 52.0.2743.75 Channel: beta OS Version: openSUSE 13.2 Flash Version: Shockwave Flash 22.0 r0
,
Aug 17 2016
I've updated to: Google Chrome 53.0.2785.57 beta
Still an issue.
My test case:
1) Create an html file called foo.html:
~~~
<html>
if JS enabled, you have alert saying hi.
<script>
alert('hi')
</script>
</html>
~~
2) Run the following command: % google-chrome-beta --disable-javascript ~/_t/foo.html
In my case, the parameter comes in and shows in chrome://version but the JS alert still shows. Also testing with Facebook still has JS enabled.
I would expect that --disable-javascript would disable JS on the first page loaded as a minimum and ideally disable JS globally for that browser session.
,
Aug 17 2016
I'm not sure which documentation you have found that indicates "disable-javascript" is a supported command line feature. Can you please provide a reference to that? I've searched the code and do not find "disable-javascript" as an applicable command line switch and that is why you see it do nothing.
,
Aug 17 2016
I could not find any formal documentation but I have seen it used for chrome stable with several mentions on the internet. Maybe its an undocumented feature? Definitely a good feature to have even if its not official. My only alternative is to use another browser :(
,
Aug 17 2016
Confirmed that it was removed from Chromium code base It existed at one point in time here: https://chromium.googlesource.com/chromium/chromium/+/df261d32079bc4e1160c36200657eed26fad5961/content/public/common/content_switches.cc But presently content_switches.cc does not have the option any longer. Its discussed here: https://groups.google.com/a/chromium.org/forum/#!topic/chromium-reviews/MrgRsAcapYQ Too bad. I am surprised that this was not left in the command line options as it has its uses. I am going to have to switch to another browser for this usecase. For those interested in this functionality in a browser. Tor Browser does not run JavaScript by default so that's my current go-to for defaulted no JS browsing.
,
Aug 17 2016
FYI, I discussed this on ServerFault here: http://superuser.com/questions/1114318/disable-javascript-in-chrome-beta-via-cli-on-linux/1114739#1114739 Please feel free to close this ticket and sorry about the noise. - Tim
,
Aug 18 2016
Closing this issue as per the comment #6 |
||
►
Sign in to add a comment |
||
Comment 1 by rnimmagadda@chromium.org
, Aug 17 2016Labels: Needs-Feedback
1.4 MB
1.4 MB View Download