Blocking vs Disabling JavaScript

General discussion and chat (archived)
User avatar
gepus
Keeps coming back
Keeps coming back
Posts: 943
Joined: 2017-12-14, 12:59

Blocking vs Disabling JavaScript

Unread post by gepus » 2019-03-25, 22:53

Because of this warning:
Forum rules
This board is for technical/usage questions and troubleshooting for the Pale Moon browser only. The main focus here is on Pale Moon on Windows. Please direct your questions for Linux, Android and Mac to the dedicated boards.
Technical issues and questions not related to the Pale Moon browser should be posted in "technical chat"
Please keep off-topic and general discussion out of this board, thank you!


I have to reply here to this post.
Moonchild wrote:Blocking content JavaScript and disabling JavaScript effectively achieve the same from a web page's perspective: it won't run.
From web pages perspective almost yes but not from the user's perspective as I pointed out above. As for the web page, it will try to bomb you with its scripts if you are blocking while it will notice immediately if you have JS disabled and maybe even redirect you to its scriptless flavor.
I could give you also an example with a site misbehaving with blocked scripting while it works fine with disabled JS.
No need to tell you the reason for the above behavior since you probably know better.
Moonchild wrote: Blocking would be the better option because it actually prevents the download, and can be applied in a fine-grained and per-site manner. Disabling JavaScript for content does neither.
Each to his own.
What is the option to turn off JavaScript (globally) good for anyway?
However, nice to learn from you the basics.

BTW,
Should Users be Permitted to Disable JavaScript?

User avatar
Isengrim
Board Warrior
Board Warrior
Posts: 1325
Joined: 2015-09-08, 22:54
Location: 127.0.0.1

Re: Blocking vs Disabling JavaScript

Unread post by Isengrim » 2019-03-25, 23:04

gepus wrote:What is the option to turn off JavaScript (globally) good for anyway?
Disabling javascript is good for security if the use case for the browser does not require javascript. I don't have any specific examples, mind you, but I can see it being a thing in niche, highly sensitive or controlled environments.
a.k.a. Ascrod
Linux Mint 19.3 Cinnamon (64-bit), Debian Bullseye (64-bit), Windows 7 (64-bit)
"As long as there is someone who will appreciate the work involved in the creation, the effort is time well spent." ~ Tetsuzou Kamadani, Cave Story

User avatar
gepus
Keeps coming back
Keeps coming back
Posts: 943
Joined: 2017-12-14, 12:59

Re: Blocking vs Disabling JavaScript

Unread post by gepus » 2019-03-25, 23:35

Isengrim wrote:Disabling javascript is good for security if the use case for the browser does not require javascript.
Security is also an aspect. It's the reason for the emphasis on globally.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35651
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Blocking vs Disabling JavaScript

Unread post by Moonchild » 2019-03-26, 12:04

I have a better idea. How about we cut all this debate short and simply remove the option to disable JavaScript globally? We don't allow users to globally disable the html parser or CSS, either, which are all equal parts to what makes the web the web. You will then have the better option left without confusion: blocking.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
gepus
Keeps coming back
Keeps coming back
Posts: 943
Joined: 2017-12-14, 12:59

Re: Blocking vs Disabling JavaScript

Unread post by gepus » 2019-03-26, 14:11

Moonchild wrote:I have a better idea. How about we cut all this debate short and simply remove the option to disable JavaScript globally?
Seems to be a great idea. Probably it would also give a strong boost for Pale Moon's market share. :)

Since it seems that you got stuck with the term globally.
Many people are using NoScript (btw, I don't), and are familiar with the term of forbidding scripts globally. That's what disabling JavaScript in the browser's preferences does and I used the term for better understanding.

User avatar
Isengrim
Board Warrior
Board Warrior
Posts: 1325
Joined: 2015-09-08, 22:54
Location: 127.0.0.1

Re: Blocking vs Disabling JavaScript

Unread post by Isengrim » 2019-03-26, 18:15

I seem to recall seeing some posts on the forum indicating that some people do set "javascript.enabled" to "false". It's not my workflow, but if the option isn't hurting anything, why remove it...?
gepus wrote:Seems to be a great idea. Probably it would also give a strong boost for Pale Moon's market share. :)
How?
a.k.a. Ascrod
Linux Mint 19.3 Cinnamon (64-bit), Debian Bullseye (64-bit), Windows 7 (64-bit)
"As long as there is someone who will appreciate the work involved in the creation, the effort is time well spent." ~ Tetsuzou Kamadani, Cave Story

User avatar
gepus
Keeps coming back
Keeps coming back
Posts: 943
Joined: 2017-12-14, 12:59

Re: Blocking vs Disabling JavaScript

Unread post by gepus » 2019-03-26, 22:05

Isengrim wrote:I seem to recall seeing some posts on the forum indicating that some people do set "javascript.enabled" to "false". It's not my workflow, but if the option isn't hurting anything, why remove it...?
Every browser I used in the past two decades had/has a button for toggling JavaScript on/off. It's part of my workflow.
Isengrim wrote:
gepus wrote:Seems to be a great idea. Probably it would also give a strong boost for Pale Moon's market share. :)
How?
I was kidding. My bad and sorry if it wasn't evident.

User avatar
Isengrim
Board Warrior
Board Warrior
Posts: 1325
Joined: 2015-09-08, 22:54
Location: 127.0.0.1

Re: Blocking vs Disabling JavaScript

Unread post by Isengrim » 2019-03-26, 22:33

gepus wrote:I was kidding. My bad and sorry if it wasn't evident.
Oh, I see now. No worries. Probably a good use for the sarcasm tag, though. :)
a.k.a. Ascrod
Linux Mint 19.3 Cinnamon (64-bit), Debian Bullseye (64-bit), Windows 7 (64-bit)
"As long as there is someone who will appreciate the work involved in the creation, the effort is time well spent." ~ Tetsuzou Kamadani, Cave Story

Goodydino
Keeps coming back
Keeps coming back
Posts: 827
Joined: 2017-10-10, 21:20

Re: Blocking vs Disabling JavaScript

Unread post by Goodydino » 2019-03-27, 23:00

If blocking javascript is removed from the interface, it would be nice if the ability to stop certain things done by javascript were left in place. I get really annoyed if some site tries to stop me from using the context menu, resize the browser window, or hide elements that should be in a browser window.

Falna
Astronaut
Astronaut
Posts: 512
Joined: 2015-08-23, 17:56
Location: UK / France

Re: Blocking vs Disabling JavaScript

Unread post by Falna » 2019-03-27, 23:46

Off-topic:
Goodydino wrote:it would be nice if the ability to stop certain things done by javascript were left in place. I get really annoyed if some site tries to stop me from using the context menu, resize the browser window, or hide elements that should be in a browser window.
There's an extension in the Classic Add-ons Archive called "Controle de scripts" that I think still does that. At least I've had it installed for years and never have such problems, so presume it's still working - but don't have a site to test it on. You could give it a try.

Forked extensions :
● Add-ons Inspector ● Auto Text Link ● Copy As Plain Text ● Copy Hyperlink Text ● FireFTP button replacement ● gSearch Bar ● Navigation Bar Enhancer ● New Tab Links ● Number Tabs ● Print Preview Button and Keyboard Shortcut 2 ● Scrollbar Search Marker ● Simple Marker ● Tabs To Portfolio ● Update Alert ● Web Developer's Toolbox ● Zap Anything

Hint: If you expect a reply to your PM, allow replies...

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35651
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Blocking vs Disabling JavaScript

Unread post by Moonchild » 2019-03-28, 09:37

Goodydino wrote:If blocking javascript is removed from the interface, it would be nice if the ability to stop certain things done by javascript were left in place. I get really annoyed if some site tries to stop me from using the context menu, resize the browser window, or hide elements that should be in a browser window.
Pale Moon Commander has a UI for the relevant preferences.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

John connor

Re: Blocking vs Disabling JavaScript

Unread post by John connor » 2019-03-28, 11:51

I use an add-on called JS Switch and I sometimes need to disable JS in websites that prevent you from doing things like a simple text copy/paste or a download of an image. Removing this ability completely is nonsensical seen as how some people seem to think they can control JS or completely disable it and still use a good portion of the Internet and as a result those that know what they are doing have to suffer with a limited feature all because of buffoonery. So I'd rather not want to see the ability to disable JS gone.
Off-topic:
I used to use NoScript myself. Thought it was the best damn add-on FF ever had and I used it in PM. Donated to the Dev even. Considered it to be a door in front of your antivirus. But over time I kept having to allow scripts temporarily on a continual basis and I was just getting tired of that. Now a days JS is all over the place and it's how a good portion of a website functions. So my main protection absent of NoScript is Sandboxie. Then I scan all downloads at Virus Total. I don't even run an antivirus. Especially on my desktop which is primarily for gaming. I don't want some signature-based overzealous antivirus software messing around with what I do. In all intents and purposes, you're far better off with the combination of Faronics Anti-executable and Sandbboxie, then scan all downloads at Virus Total. Even better maybe Shadow Defender, but that can be cumbersome like NoScript you have to whitelist lots of directories so things stick on computer power cycles. Your antivirus software relies on signatures and that's a weak spot with polymorphic malware. Better than nothing I suppose.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35651
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Blocking vs Disabling JavaScript

Unread post by Moonchild » 2019-03-28, 13:52

F22 Simpilot wrote:websites that prevent you from doing things like a simple text copy/paste or a download of an image.
And why do you think that websites do this? To be blunt: because it's not your content to treat as your property. If websites go through lengths to make it difficult for you to copy or download displayed content, then there is a good reason for that behavior -- or they wouldn't make the effort.
F22 Simpilot wrote:those that know what they are doing
Do they, really? Or are they using a sledgehammer when more fine-grained controls exist to do this, like the individual controls to prevent context-menu manipulation or clipboard manipulation?
And in what way is there "suffering"? I think you're up-playing this tremendously -- the bottom line is that it's not "buffoonery". There are very few, if any, situations in which completely killing JS for content is called for. In fact, I'd like to see you come up with a situation where it is, that can't be handled in a more graceful way.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

John connor

Re: Blocking vs Disabling JavaScript

Unread post by John connor » 2019-03-28, 16:05

This page here does not allow you to copy text unless you disable JS. The same text from this website is cross posted on another website. So it's not a copyright issue, but rather a "I can do it and want to be a dick."

http://mt-milcom.blogspot.com/2019/03/d ... -wwvh.html

Note it's blogspot.com. Not some news Corp.

And just in case you go there. It says:
Welcome to the Milcom Monitor Post sponsored by Teak Publishing (Copyright © 2006-2018 Teak Publishing).
That's sponsored, not owned.

And besides. I can go to a plethora of news websites and copy text without issue.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35651
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Blocking vs Disabling JavaScript

Unread post by Moonchild » 2019-03-28, 17:40

Not to argue, but sponsored posts are generally sourced by the sponsor and if they have copyright then the sponsored post is licensed to be published. Just because you've seen the same text somewhere else doesn't mean it's not copyrighted.

Like I said if they prevent this it's for a reason. Even so if the reason is "just because I can" then the webmaster still has that right to THEIR owned content.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

JustOff

Re: Blocking vs Disabling JavaScript

Unread post by JustOff » 2019-03-28, 17:53

Not that I really want to get involved in this argument, but what about fair use?

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35651
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Blocking vs Disabling JavaScript

Unread post by Moonchild » 2019-03-28, 19:26

Fair use has nothing to do with this.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
gepus
Keeps coming back
Keeps coming back
Posts: 943
Joined: 2017-12-14, 12:59

Re: Blocking vs Disabling JavaScript

Unread post by gepus » 2019-03-29, 11:12

Moonchild wrote: Like I said if they prevent this it's for a reason. Even so if the reason is "just because I can" then the webmaster still has that right to THEIR owned content.
Absolutely.
By the same token the user still has the right to access such content with a browser configured at his like.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35651
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Blocking vs Disabling JavaScript

Unread post by Moonchild » 2019-03-29, 12:51

gepus wrote:
Moonchild wrote: Like I said if they prevent this it's for a reason. Even so if the reason is "just because I can" then the webmaster still has that right to THEIR owned content.
Absolutely.
By the same token the user still has the right to access such content with a browser configured at his like.
And a developer still has the right to determine what is configurable by the user at his like. And to remove what is, in his opinion, unnecessary, redundant or unwanted.

I'm still waiting for that example of something where globally disabling JS is the only "path to freedom".
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Fedor2

Re: Blocking vs Disabling JavaScript

Unread post by Fedor2 » 2019-03-29, 15:56

Today only few sites works with js disabled, so it is no point complete js disable for general purpose browser. And another reason that for cunning folks was developed noscript and meta http-equiv things, how you will handle them? Blocking is better i think, noscript is the most handy for that, it deals with meta http-equiv too, what if it breaks something, not hurts keep watch.