Blocking Script Loading

Bug reports and enhancement requests
Post Reply
ujeenator
Posts: 1
Joined: Fri Mar 14, 2025 7:36 pm

Blocking Script Loading

Post by ujeenator »

Hi, I have a question regarding NoScript's behavior.

Would it be possible for NoScript to block scripts from being loaded entirely if they are already blocked from execution? This could significantly reduce bandwidth usage, especially on websites where scripts are unnecessary.

From what I understand, NoScript currently prevents execution but still allows the browser to download the script file. If there’s a way to stop the script request itself, it could further enhance performance and reduce unnecessary network traffic.

Is this something that the community and NoScript developers would consider beneficial? If there's interest and support for this feature, I’d be happy to contribute by creating a pull request.
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:136.0) Gecko/20100101 Firefox/136.0
barbaz
Senior Member
Posts: 11032
Joined: Sat Aug 03, 2013 5:45 pm

Re: Blocking Script Loading

Post by barbaz »

ujeenator wrote: Fri Mar 14, 2025 7:42 pm Would it be possible for NoScript to block scripts from being loaded entirely if they are already blocked from execution?
NoScript already does this wherever possible, which is anytime the active content is a separate request.

So for example disallowed script files are not downloaded. Inline scripts are part of the main webpage and not separate network requests, so it's not possible to prevent downloading these without also blocking the entire webpage.
ujeenator wrote: Fri Mar 14, 2025 7:42 pm From what I understand, NoScript currently prevents execution but still allows the browser to download the script file.
Nope, this is exactly the case where NoScript can and does block the download of the script. What made you think otherwise?
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; Linux x86_64; rv:136.0) Gecko/20100101 Firefox/136.0
Post Reply